Question: USING MATLAB ANSWER THE FOLLOWING QUESTIONS Write a function called testneg with one input and no outputs. The function will test to see if the
USING MATLAB ANSWER THE FOLLOWING QUESTIONS
Write a function called testneg with one input and no outputs. The function will test to see if the input value is negative. If it is negative, use fprintf to print the message to the screen
Warning: The input value n is negative.
where n is not literally the letter n, but is the value of the input to the function. Assume the input value is a floating-point number, so use an appropriate format in the fprintf to print the value with 2 decimal places. If the value of the input is not negative, dont print anything.
Write a function to test if a number is between 10 and 20. It will have one input (the number to be tested) and no outputs. If the number is between 10 and 20, print an appropriate message. If not, also print an appropriate message.
A particular line of wind turbines can have 2, 3, or 4 blades. Write a function with one input and no outputs, where the input will be the number of blades. Use a switch statement to write to the screen
The turbine has n blades
Where n is not literally the letter n, but the number of blades that was input.
Below is a chart of the classification of egg sizes from Wikipedia. Write a function with one input and no outputs. The input will be the weight of an egg in ounces. The function will print the egg size to the screen in the following format
Weight = n oz
Size = size classification
| Size | Minimum Weight (oz.) |
| Jumbo | 2.50 |
| Extra Large | 2.25 |
| Large | 2.00 |
| Medium | 1.75 |
| Small | 1.50 |
| Peewee | 1.25 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
