Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions