Answered step by step
Verified Expert Solution
Question
1 Approved Answer
~~~~~~~~~Posted below is a problem in MATLAB, please answer and provide the correct coding and functions. Thanks!~~~~~~~~~~~~~~ 1. i. Write a function called myfunction that
~~~~~~~~~Posted below is a problem in MATLAB, please answer and provide the correct coding and functions. Thanks!~~~~~~~~~~~~~~
1. i. Write a function called myfunction that takes two input numbers a and b and output two values C1 and O2. oi is calculated as the first input divided by the second input. O2 is the sum of the two inputs. The function checks to make sure the inputs are all scalars, else it prints an error message. ii. On MATLAB's command prompt, how will you call your function with a 12 and b 34 while assigning your function's returns to the variable joe and mary. 2 a. Given the following matrix, A 13 7 9 4 5], show the results generated by MATLAB command, fprintf(x F .5fn', A) b. Given pl 5, p2 11, p3-12.542 p4 33.45 Write an fprintf statement(s) that will output the following statement: The cost to ship 5 pounds, 11 ounces using Ground Transportation is USD 22.15 BUT The cost to ship 12.542 pounds using Express is $33.45Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started