If I write a function like
function A = myplot(x,y) A = plot(x,y); set(A,etc....) end
When I call this function, a lot of numbers instead of a plot are shown. If modify the code as follows,
function A = myplot(x,y) plot(x,y) end
then an error occurs as output argument "A" is not assigned during the call to the function.
How may I correct this?
Best Answer