From: Shubham Pandey on
I am trying to get the plot of function x.^2+y.^2
by this method

fh=@(x,y)(x.^2+y.^2);
fplot(fh,[0 20 0 10])

but its showing error can anyone help me please, i will be grateful
From: Wayne King on
"Shubham Pandey" <shubham_143_onnet(a)yahoo.com> wrote in message <i3lm4h$9cc$1(a)fred.mathworks.com>...
> I am trying to get the plot of function x.^2+y.^2
> by this method
>
> fh=@(x,y)(x.^2+y.^2);
> fplot(fh,[0 20 0 10])
>
> but its showing error can anyone help me please, i will be grateful

Hi Shubham, What are you trying to plot? Are you trying to plot the surface

z=x^2+y^2 ?

How about:

ezsurf('x^2+y^2')
shading interp;

Wayne
From: Jan Simon on
Dear Shubham,

> fh=@(x,y)(x.^2+y.^2);
> fplot(fh,[0 20 0 10])
> but its showing error can anyone help me please, i will be grateful

It is always a good idea not to state only, that there is an error, but paste a copy of the message. Matlab's error messages are meaningful and help you and us to identify your problem.

Kind regards, Jan