I have function which takes 2 inputs:
function [r] = myfunc(x,y)
I want to plot this function but i get this error:
>> plot(myfunc, [1 2]);
Error using myfunc (line 2)
Not enough input arguments.
If I understand your question, I think you're looking for this:
[r] = myfunc(x,y)
plot(x, y, r)
I'm assuming that myfunc takes x and y as vectors, and returns r as a vector. If not, let me know, and I'll post an edit explaining how to properly set up x, y, and z for use with plot.
plot3 if it's a 3D curve. That code will plot (x, y) values with r as additional properties to the curve... Colour... Markers.
plotproperly.plottakes in a set ofxvalues and a set ofyvalues as the default set of parameters. The output will produce a figure that plots points. Can you show whatmyfunclooks like? Depending on what it looks like, I can suggest options to help you plot your function.