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
When designing a slide for presentation, it is best to include as much information as possible on every slide. True Or False
Mariulka [41]

Answer:

false

Explanation:

try to limit the amount of info on each slide

4 0
3 years ago
Read 2 more answers
Gregor installed a third stick of known-good RAM into his Core i7 system, bringing the total amount of RAM up to 3 GB. Within a
MA_775_DIABLO [31]

Answer:

The speed or quality was different.

Explanation:

The new ram that he installed most likely had a different rate, or was a different quality than the old ram.

5 0
3 years ago
What type of expense generally covers performing and producing elements?
Paraphin [41]

Answer:

You might think expenses are expenses. If the money's going out, it's an expense. But here at Fiscal Fitness, we like to think of your expenses in four distinct ways: fixed, recurring, non-recurring, and whammies (the worst kind of expense, by far).

7 0
3 years ago
Jim has listed stages of the product life cycle in his presentation which slide element can you use to make the items in the lis
IgorC [24]

jim can use bullet points.

  • this
  • is
  • an
  • example
  • of
  • bullet
  • points!
8 0
3 years ago
This algorithm requires you to find the perimeter of 12 different squares.
k0ka [10]

Answer:

BEGIN

SET count = 1

WHILE count <= 12 THEN

     INPUT length

     perimeter = length * length

     PRINT perimeter

END WHILE

END

Explanation:

You can also set count to 0 and in while loop use count < 12 to loop just 12 times just as above

4 0
2 years ago
Other questions:
  • Which of these engine components forms a tight seal between the piston and the cylinder and is necessary for proper engine opera
    13·2 answers
  • What is the software that manages and controls the activities and resources of the computer? O The CPU The OS The ALU The GUI D
    13·1 answer
  • 4. Where do you find the command to create bibliography citations or a table of contents?
    14·2 answers
  • The blank contains the computer's brain the central processing unit CPU
    8·1 answer
  • How will you ensure that all of the network's applications and tcp/ip services also support ipv6?
    10·1 answer
  • Problem 1. MST - Prim's and Kruskal's algorithms
    13·1 answer
  • En una Memoria SD de 128 Gb, ¿Cuántas fotos en alta resolución de 16 Mb puedo almacenar?
    12·1 answer
  • Create a text file content.txt and copy-paste following text (taken from Wikipedia) into it: A single-tasking system can only ru
    7·1 answer
  • How to give a brainiest on a question? if you teach me i will give brainiest
    7·2 answers
  • Quick I need help ASAP
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!