Question: Function z = function1 (x, y) %this puts the number or array x before the number or array y inside of a new array, z.

Function z = function1 (x, y)

%this puts the number or array x before the number or array y inside of a new array, z. You can assume any arrays, x or y, are row arrays so this will always wok to create a new row array.

Z = [x y];

Function a = function2(x,y)

a = x + y;

Function s = function3 (x, y)

s = x y;

Using only a function header and calls to the three functions above, write a function that takes two inputs, num1, and num2, and returns one output, array.

array should be 1 x 4. The first element should be num1+num2. The second element should be num1. The third element should be num2. The last element should be 0. 0 should be obtained as the output of a function, not hardcoded. Remember that you must accomplish this without any built-in functions, matrix operations, or mathematical operators in your function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!