1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
solniwko [45]
3 years ago
11

Modify an array's elements Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples t

hat is less than minValue. Ex: If minVal = 10, then dataSamples = [2, 12, 9, 20] becomes [4, 12, 18, 20]. Function Save Reset MATLAB DocumentationOpens in new tab function dataSamples = AdjustMinValue(numberSamples, userSamples, minValue) % numberSamples: Number of data samples in array dataSamples % dataSamples : User defined array % minValue : Minimum value of any element in array % Write a for loop that iterates from 1 to numberSamples to double any element's % value in dataSamples that is less than minValue dataSamples = userSamples; end 1 2 3 4 5 6 7 8 9 10 Code to call your function
Computers and Technology
1 answer:
ValentinkaMS [17]3 years ago
3 0

Answer:

See explaination for program code

Explanation:

%save as AdjustMinValue.m

%Matlab function that takes three arguments

%called number of samples count, user samples

%and min vlaue and then returns a data samples

%that contains values which are double of usersamples

%that less than min vlaue

%

function dataSamples=AdjustMinValue(numberSamples, userSamples, minValue)

dataSamples=userSamples;

%for loop

for i=1:numberSamples

%checking if dataSamples value at index,i

%is less than minValue

if dataSamples(i)<minValue

%set double of dataSamples value

dataSamples(i)= 2*dataSamples(i);

end

end

end

Sample output:

Note:

File name and calling method name must be same

--> AdjustMinValue(4, [2,12,9,20],10)

ans =

4 12 18 20

You might be interested in
What are the reasons why is it necessary to evaluate online sources and content?
marissa [1.9K]
1) You don't know if the source is reliable. 
2) It is better to cite reliable sources so.
7 0
3 years ago
Source code is one particular representation of a software system. It highlights some details and hides others. This is a good e
grigory [225]

Answer:

Abstraction

Explanation:

Under fundamental principles of software engineering, the term "abstraction" is simply defined as the act of highlighting some details and hiding other ones.

Thus, the correct answer among the options is Abstraction.

8 0
3 years ago
What layer is responsible for routing messages through an internetwork in the tcp/ip model?
Paul [167]

Answer:

<h2>The TCP/IP model consists of four layers: application, transport, internet, and network access. Of these four layers, it is the internet layer that is responsible for routing messages.</h2>
4 0
2 years ago
For most usb devices, power is supplied via ____.
ser-zykov [4K]

For most usb devices, power is supplied via the port.

3 0
3 years ago
An international package shipping company like FedEx needs to be able to track the location of every package at every stage in t
Luba_88 [7]

Answer:

<em>The specific type of software useful in this situation would be a ship manager software. </em>

Explanation:

<em>It is a stand alone, user installable, windows-based software package designed to allow the quickly ship, track, and report the daily activities.</em>

<em>In addition to managing shipment information, the software keeps the details of the operation, so that the user can easily retrieve necessary information about his shipments.</em>

8 0
3 years ago
Read 2 more answers
Other questions:
  • Is anyone else experiencing the wording::nonifacation::glitch about the "5 hours ago" thingy to whenever you answer a question o
    7·2 answers
  • Instructions Write a program that asks the user for a number. If the number is between 1 and 255, the program outputs the corres
    15·1 answer
  • A ____ is a text document written in HTML.
    13·1 answer
  • Read the excerpt from The Code Book. Other attacks include the use of viruses and Trojan horses. Eve might design a virus that i
    13·1 answer
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • Assume variables SimpleWriter out and int n are already declared in each case. Write a while loop that printsA. All squares less
    11·1 answer
  • can somebody please explain to me why I woke up today to see that all of my 40 answers where deleted ? like what I spent hours
    11·2 answers
  • Convert 198 / 61 to ratio​
    9·1 answer
  • The Review tab in Microsoft Publisher provides two groupings called _____. Proofing and Language Spell Check and Research Proofi
    6·1 answer
  • How to create a network of relevant prospects?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!