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
Reil [10]
3 years ago
15

Write a for loop that iterates from 1 to numbersamples to double any element's value in datasamples that is less than minvalue.

Ex: If minval = 10, then dataSamples = [2, 12, 9, 20] becomes [4, 12, 18, 20] function datasamples = AdjustMinValue (numbersamples user Samples minValue) % numbersamples: Number of data samples in array datasamples % data Samples 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 data Samples = user Samples; end
Computers and Technology
1 answer:
CaHeK987 [17]3 years ago
4 0

Answer:

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

Explanation:

The given code is in MATLAB.

You might be interested in
The overall visual look of a chart in terms of its graphic effects, colors, and backgrounds is the:
Liula [17]
The answer to this is b!!
8 0
3 years ago
What is the disadvantage of server based network?
lukranit [14]

Answer:

do u have different networks too?

5 0
3 years ago
Read 2 more answers
What is an identifier? Give an example of an identifier.
ser-zykov [4K]

Explanation:

An identifier is the name of a program or the names of the variables, classes, methods, namespaces or interfaces within a program that are used to identify the relevant data/info.

Typically, identifiers must start with a letter (no numbers) and must not have any spaces in them, it should indicate the meaning and usage of the element being referred and i  t cannot have more than 511 characters.

An example is:

<em>int money; </em>

<em>double accountBalance;</em>

Where money and accountBalance are the identifiers.

I hope you find this information useful and interesting! Good luck!

7 0
3 years ago
The main thing that adjusting the aperture controls when taking an image is?
Pani-rosa [81]
The temperature controller
6 0
3 years ago
Directions for starting the computer and opening a word processor document
aleksandr82 [10.1K]
First you download word after you open a page  and you start 
4 0
3 years ago
Other questions:
  • There are many differenttypes of models, but an individual DSS can consist of onlyone.
    15·1 answer
  • 10. Question
    15·1 answer
  • Consider relations A and B. Relation A represents the entity on the ""one side"" of a one-to-many relationship; Relation B repre
    11·1 answer
  • Josh wants to convey his best wishes to johnathin for a meeting schedualed later diring the day. Which business documented would
    7·1 answer
  • Do you think I could create a working animatronic like the one from five nights at freddys
    12·2 answers
  • What term is used to refer to the merging of government services with information technology?
    11·1 answer
  • Convert the given for loop to while loop and find the output of the program assuming the
    14·1 answer
  • What would the internet be like today if there was no World Wide Web?
    9·1 answer
  • explain why you can determine machine epsilon on a computer using IEEE double precision and the IEEE Rounding to Nearest Rule by
    7·1 answer
  • Explain how you think robotics plays a part in the subway driver's job.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!