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
By Carl Sandburg
Eva8 [605]
The answer is 1 because the poet uses personification.
6 0
3 years ago
What are foundations of any game systems that control what the players can or cannot do in the game, as well as the penalties, r
san4es73 [151]

Answer:

A. Rules

Explanation:

Rules can determine what can be done and what cannot be done... giving it restrictions, or RULES in a video game among-st a player

4 0
2 years ago
Which statement best describes the cut and paste option in a word processor?
tekilochka [14]

B i correct so yea and yea

8 0
3 years ago
Read 2 more answers
Inserting and deleting text is a basic editing task in word processing.<br><br> True or false
Katyanochek1 [597]
The answer should be true
3 0
2 years ago
Read 2 more answers
Erewrxdnnefwn q wedsvd
Alexus [3.1K]

Answer:

hahahahahhahahahahhaha

6 0
3 years ago
Other questions:
  • True or false over the course of ecological succession,species diversity increases over time?
    12·2 answers
  • In scratch the location of a sprite is defined by what?
    10·1 answer
  • If you've been a victim of identity theft, what should you do after contacting the company that reported the suspicious charge a
    9·1 answer
  • What are two most common types of microcomputers? a. IBM-style PCs and Macs c. Clients and Servers b. Mainframes and Minicompute
    14·1 answer
  • 1. What is Java SE?
    11·2 answers
  • ) Doyou know applets and Java Beans in Java? Please briefly state eachone with an example.
    10·1 answer
  • Tornado Alley is located in the middle of the United States, extending from Texas up through the Dakotas. The above statement is
    6·1 answer
  • True or false: The objective of an Enterprise Resource Planning (ERP) system is to create a customized software program that int
    10·1 answer
  • You have an audio that contains one pause for 0.2 seconds and another one for 0.6 seconds. When do you need to create a new segm
    5·1 answer
  • How many operations can a computer perform every second?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!