Answered step by step
Verified Expert Solution
Link Copied!

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!~~~~~~~~~~~~~~

image text in transcribed

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.45

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. EMC Corporation

Answered: 1 week ago

Question

6. Vanguard

Answered: 1 week ago