Question: 27) Create an m' file named 'MyFunction.m which contans a function. The function should have three inputs, x, y, and z, and two outputs, ol
27) Create an m' file named 'MyFunction.m which contans a function. The function should have three inputs, x, y, and z, and two outputs, ol and o2. The first output, o1, should be the sum of the three inputs, and the second output, o2, should be equal to (xty)./z (notice the 'dot' in the division). (a) Call this function in the command prompt by using different inputs to make sure tha it works properly. For this part, use numbers as inputs. Look at the outputs to confirm that they are correct. (b) Call again the function in the command prompt, but this time x, y, and z should be arrays of the same size. Look at the outputs to confirm that they are correct. (c) Repeat part (b), but this time remove the dot, from (x+y)/z. what do you observe? 1% create a function , 2 3 function [01, o2] = myfunction (x,y,z) 4 01 x + y + z %% 1st output 02 = (x+y ) /2 882nd output 6 end 7 >>myfunction Not enough input arguments. Error in myfunction (line 4) 01 = x + y + z %% 1st output need help resolving the error in my matlab program thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
