Question: Write a ( pretty useless ) function function printstuff ( func , values ) that takes a func - tion handle func of a function
Write a pretty useless function function printstufffuncvalues that takes a func
tion handle func of a function that takes one argument and returns one number, evaluates
that function at the points given in the vector values and prints the values to the screen.
The output should look like this:
myfunc @xx;
printstuffmyfunc;
Function evaluated at points:
for x the value is
for x the value is
for x the value is
Hint: Use a for loop and fprintf look up fprintf in the MATLAB help
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
