Question: 1) Write a function name myFunction(a,flag) Who would accept two input arguments a and flag and return the value of a squared if flag is
1) Write a function name myFunction(a,flag) Who would accept two input arguments "a" and flag and return the value of "a" squared if "flag" is greater than zero if not, return the value of a cubed.
2)Write a function named myFunction(a,b) which accepts two different input arguments "a" and "b" use if-else and return the bigger one of the two.
3)Write a function named myFunction(a,b) who would accept two inputs "a" and "b" and return the volume of a cylinder using the greater one of (a,b) as base radius, and the smaller one as height.
Using Matlab
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
