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
solniwko [45]
3 years ago
11

Modify an array's elements Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples t

hat is less than minValue. Ex: If minVal = 10, then dataSamples = [2, 12, 9, 20] becomes [4, 12, 18, 20]. Function Save Reset MATLAB DocumentationOpens in new tab function dataSamples = AdjustMinValue(numberSamples, userSamples, minValue) % numberSamples: Number of data samples in array dataSamples % dataSamples : 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 dataSamples = userSamples; end 1 2 3 4 5 6 7 8 9 10 Code to call your function
Computers and Technology
1 answer:
ValentinkaMS [17]3 years ago
3 0

Answer:

See explaination for program code

Explanation:

%save as AdjustMinValue.m

%Matlab function that takes three arguments

%called number of samples count, user samples

%and min vlaue and then returns a data samples

%that contains values which are double of usersamples

%that less than min vlaue

%

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

Sample output:

Note:

File name and calling method name must be same

--> AdjustMinValue(4, [2,12,9,20],10)

ans =

4 12 18 20

You might be interested in
A user called to inform you that the laptop she purchased yesterday is malfunctioning and will not connect to her wireless netwo
Aloiza [94]

Answer:

B. Have the user press the appropriate function key combination to enable the wireless radio and then attempt to connect to the wireless network.

Explanation:

Every more often than not, users may experience wireless connection problems. How they respond to these issues solely depends on various factors. When a user like this has issues connecting to the network, first on the list of proper troubleshooting procedures is to check whether the wireless adapter or the function key that turns the wireless radio connection on is toggled on. Sometimes the most obvious causes are the hardest to see. The user should check this first because it will save him or her lots of troubleshooting time if the switch was simply physically disabled.

6 0
3 years ago
To draw a clustered cylinder chart, first select the data to be charted and then click the column button (insert tab | charts gr
d1i1m1o1n [39]
It is true that to <span>draw a clustered cylinder chart, first select the data to be charted and then click the column button (insert tab | charts group).</span>
5 0
3 years ago
How to remove special formatting from a table in word.
ch4aika [34]

Answer:

Clear Format

Explanation:

7 0
2 years ago
Children may be placed in restraining devices such as high chairs, swings or bouncy seats
Ratling [72]
Yes in my opinion. People will say no but there is no right answer
8 0
3 years ago
An associate is seeking advice on which device to purchase for a friend who is a business owner. The friend needs the ability to
spayn [35]

The best recommendation in the mentioned scenario would be a smart watch.

Answer: Option A.

Explanation:

The best device for a business owner who needs an access to chat as well as to be in touch with the home office would be a smart watch. A smart watch is similar to a mobile device, which is worn on a wrist and which has a touchscreen display.

The benefits of smart watch are numerous. It makes us updated about everything without using our smartphone. The smart watch will help the business owner to engage with others and to handle his work at the same time.

5 0
3 years ago
Other questions:
  • All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
    15·1 answer
  • Question 4 (2 points)
    6·2 answers
  • Gunther is filling in his own input mask. He wants to format the Social Security numbers of his clients. The field must contain
    5·1 answer
  • Who was the founder of the location-sharing site Whrrl
    6·1 answer
  • HELP 15 POINTS
    12·2 answers
  • Which of the following is part of the 6-by-6 rule?<br><br> i need help!!!!!
    5·1 answer
  • Que significa el término Informática?
    6·1 answer
  • I don't know if this is supposed to go here or art but i need help with photoshop, basically you can create whatever you want bu
    7·1 answer
  • How do you write a multiplication formula in excel with an absolute refrence?
    11·1 answer
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!