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
Mohammed's parents learn that his classmates have
n200080 [17]

FULL PROBLEM:

Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s fine because they are just teasing him.

Which challenge is making it difficult to stop the cyberbullying of Mohammed?

A.  The classmates are using secure computers.

B.  The classmates are using technology positively.

C.  Mohammed doesn’t have any evidence of the cyberbullying.

D.  Mohammed doesn’t believe the cyberbullying exists.

ANSWER:

D.  Mohammed doesn’t believe the cyberbullying exists.

3 0
3 years ago
Read 2 more answers
A user reports that he can't connect to a specific website. you go to the user's computer and reproduce the problem. what should
Inessa05 [86]
I would check that DNS is working, and then check that the returned address accepts connections properly.
3 0
3 years ago
When both gears are the same size what will they produce
djverab [1.8K]

They produce a 1:1 ratio.  The input power is equal to the output power.

7 0
4 years ago
What else needs to be done when creating a site?
SSSSS [86.1K]
When you are creating a website, you will usually need to add details to the website. If you're coding a website as HTML, you always have to make sure your code is correct. If one thing is a mess up, you have to start the whole thing all over again. 
5 0
3 years ago
What is the different between information and data
Vika [28.1K]
Data is an individual unit that contains raw materials which do not carry any specific meaning. Information is a group of data that collectively carries a logical meaning.
7 0
3 years ago
Other questions:
  • Question 3 / 5
    9·1 answer
  • Suppose we have an arrayAofnprofessors; each teacher has two characteristics: difficulty (a numberin the range [0,10], where a h
    7·1 answer
  • Which of the following has the honor of the first robot-human handshake in space?
    10·1 answer
  • we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet scheduling disciplines. Which of these queu
    12·1 answer
  • The ‘capacity for emergency management and response personnel to interact and work well together’ describes which of the key com
    10·2 answers
  • How to run android apps on a chromebook?
    15·1 answer
  • Write the generation in which transistors were used!
    12·1 answer
  • Which of the following is needed to connect to the Internet? HELP ASAP
    9·1 answer
  • The entities on which data are collected are _____.
    10·2 answers
  • PART 2 - Exercise 2 - Programming Assignment
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!