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]
2 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]2 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
Which is the most likely reason why scientists change a model?
frozen [14]

C.) New discoveries make the current model inaccurate. Since science is all about observation and experimentation, it is logical that whenever new findings are gathered, scientific models must be modified to adapt to the information. As new ideas and concepts are uncovered, models should be updated to make them correct.

5 0
3 years ago
Read 2 more answers
Steve is happy today but he ____ yesterday​
suter [353]

steve is happy today but he wasn't yesterday

3 0
2 years ago
Read 2 more answers
Which type of worker would most likely be able to begin work after receiving a high school degree and completing an
makvit [3.9K]
I’m pretty sure it’s miner

“I’ll give you head I mean brainiest”
3 0
2 years ago
8. What do you believe: should husbands make decisions for their wives.
nirvana33 [79]

Answer:

No.

Explanation:

Because wives should make decisions for their life themselves.It helps them be self dependent so that they won't have to depend on their husbands. By letting them make decisions themselves they can get a successful career on their own effort and decisions.

3 0
2 years ago
The ____ of a variable is the location in memory where it’s value is stored. A. Value B. Address C. Data type D. Number
fomenos

Answer: C. Data type

Explanation:

data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before its use in a program. Size of variable, constant and array are determined by data types.

3 0
3 years ago
Other questions:
  • Which protocol, as a companion protocol to RTP, provides monitoring and reporting for RTP connections?
    14·1 answer
  • Which is a characteristic of an effective problem statement? It is based on research. It contains outside information. It contai
    12·1 answer
  • What type of network is capable of delivering voice, video streams, text, and graphics between many different types of devices o
    15·1 answer
  • Question 4: What will be the output of the code? Show a complete analysis.
    6·1 answer
  • Is it important for a writer to include voice and point of view in writing because...<br> Plz help
    10·1 answer
  • What does it mean to say that data in an Excel table is “dynamically linked” to a chart? What are the advantages of this feature
    5·1 answer
  • What is the base of a number system?
    8·1 answer
  • How many passes will it take to find the four in this list?
    15·2 answers
  • Find the total cost of a $125 coat purchased in Los Angeles County where the sales tax is 9%. Use the expression c + 0.09c
    10·1 answer
  • What are the disadvantages of vector images when compared to bitmap images?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!