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
¿cuáles son los usos que se le pueden dar a una bicicleta?
riadik2000 [5.3K]

Answer:

pues de decoracion las llantas de columpios y los cuernos de antenas de tele okey no me presiones estoy en clase y acabo de hacer 11 ejercicios y acaba de empezar ok

7 0
3 years ago
Please Help!
Alex787 [66]

The three default components listed in the inspector view of a terrain assets are: Terrain, Terrian Collider  and Texture.

So the answer is Transform.

If you use the Move tool then click and drag an object while holding CTRL and Shift at the same time, it will snap the object to intersection points of the Collider; allowing stacking of objects automatically.

So the answer is Stack objects automatically.

3 0
3 years ago
Read 2 more answers
Define the terms candidate key and primary key. Explain the difference between a primary key and a candidate key.
Shkiper50 [21]

Explanation:

Both Primary Key and Candidate Key are the attributes that are used to access tuples from a table. These (Primary key and Candidate key) are also can be used to create a relationship between two tables.

  • A Candidate Key can be any column or a combination of columns that can qualify as a unique key in the database. Each Candidate Key can qualify as a Primary Key.
  • A Primary Key is a column or a combination of columns that uniquely identify a record. The primary key is a minimal super key, so there is one and only one primary key in any relationship.

<em> The main difference between them is that a primary key is unique but there can be many candidate keys. </em>

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

5 0
3 years ago
What are the basic tools for coding HTML manually?
ipn [44]
The answer should be C, you need a text editor to write out the code, and then a web browser to view what the code creates.
5 0
3 years ago
Read 2 more answers
What are the three major functions of a game engine?
zzz [600]
Three major functions of a game engine would be Physics, Programming, and an audio engine should be some major functions of a game engine.
4 0
3 years ago
Other questions:
  • A(n) ____ loop executes a predetermined number of times.
    12·1 answer
  • What do u call a individual that loves motor bikes and leather and is in a rival group known as mods?
    5·1 answer
  • Which of the following is likely the cause of the bass from a sound system rattling the windows on your car?
    11·1 answer
  • How can i complain a rude comment
    7·1 answer
  • 14<br> Select the correct answer.<br> Which activity is a marketing technique?
    9·1 answer
  • _____ is a subset of a data warehouse in which only a focused portion of the data warehouse information is kept. A. Data diction
    6·1 answer
  • What type of version of visual studio is the visual studio express
    8·1 answer
  • This is a quick and easy program that will let you practice the basics of the switch statement. You will ask the user to enter a
    6·1 answer
  • Sally has 4 quarters, 2 dimes, 6 nickels, and 10 pennies.
    13·2 answers
  • Life without internet points
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!