Multiple if statements Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement that adds 3 to outputValue if phaseResponse is less...


Please answer in matlab code.


Multiple if statements<br>Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement that adds 3 to<br>outputValue if phaseResponse is less than 275.<br>Function<br>Save<br>C Reset<br>I MATLAB Documentation<br>1 function outputValue =<br>Adjustoutput(outputValue, amplitudeResponse, phaseResponse)<br>3<br>% Write an if-statement that subtracts 5 from outputValue<br>4<br>% if amplitudeResponse is greater than 10<br>outputValue<br>outputValue;<br>7<br>% Write an if-statement that adds 3 to outputValue if<br>8<br>% phaseResponse is less than 275<br>9.<br>10 end<br>

Extracted text: Multiple if statements Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement that adds 3 to outputValue if phaseResponse is less than 275. Function Save C Reset I MATLAB Documentation 1 function outputValue = Adjustoutput(outputValue, amplitudeResponse, phaseResponse) 3 % Write an if-statement that subtracts 5 from outputValue 4 % if amplitudeResponse is greater than 10 outputValue outputValue; 7 % Write an if-statement that adds 3 to outputValue if 8 % phaseResponse is less than 275 9. 10 end
Medication dosage by weight<br>A machine administers medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageAmount<br>given userWeight.<br>Weight (kg)<br>Dosage (units)<br>Less than 50<br>10<br>50 - 140<br>20<br>Greater than 140<br>30<br>Ex: If userWeight is 65, then dosageAmount is assigned with 20.<br>Function e<br>Save<br>C Reset<br>MATLAB Documentation<br>1 function dosageAmount<br>CalculateDosage(userWeight)<br>2 % userWeight: User's weight in kg<br>3<br>4<br>% Assign dosageAmount with the appropriate amount given userWeight<br>dosageAmount<br>= 0;<br>7 end<br>

Extracted text: Medication dosage by weight A machine administers medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageAmount given userWeight. Weight (kg) Dosage (units) Less than 50 10 50 - 140 20 Greater than 140 30 Ex: If userWeight is 65, then dosageAmount is assigned with 20. Function e Save C Reset MATLAB Documentation 1 function dosageAmount CalculateDosage(userWeight) 2 % userWeight: User's weight in kg 3 4 % Assign dosageAmount with the appropriate amount given userWeight dosageAmount = 0; 7 end

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here