user3887089
user3887089

Reputation: 307

MATLAB function handles

Im working on a MatLab homework and don't understand quite what the task is. The homework states:

Create a MATLAB funciona in an .m file which receives a handle for a two-dimensional function and which creates a surface plot with a range of values input while the .m file is running.

I can't make sense of what I'm supposed to be doing. Could anyone provide such an example?

Upvotes: 0

Views: 136

Answers (1)

Your homework is to define a MATLAB function. As it is a homework, you should know how to do that.

The input variable for your function should be a handle for a two-dimensional function. Again, you should know what this means, or you should be able to figure it out (hence homework). Hint: help function_handle.

The function should read the plot ranges during runtime, i.e. interactively from the user (writing something into the command line). You should know how to do this.

And finally, your function has to plot the 2d surface (provided as input parameter) over the range (provided as interactive input). You should know how to do this.

Upvotes: 3

Related Questions