From: Mark Saint on
Hi, im a student and im new using matlab, just started
1 week ago, so sorry if my question is not apropiate.
I have to make the following exercise in matlab:

·In a subwindow print the function z=x-y+3 within domain [-2,2]X[-2,2] as a colored
surface and using a grid of 25x20.

So the problem is achieve the 25x20 grid,

I try using:
ezsurf ('x-y+3',[-2,2,-2,2])

and in matlab help:
ezsurf(...,n) plots f over the default domain using an n-by-n grid. The default value for n is 60.

but i assume if i use that it will create square grid, not the 25x20 grid.

Any hint for a newbie?

Thx in advantage.
From: us on
"Mark Saint" <jaijai28(a)hotmail.com> wrote in message <hss314$1ck$1(a)fred.mathworks.com>...
> Hi, im a student and im new using matlab, just started
> 1 week ago, so sorry if my question is not apropiate.
> I have to make the following exercise in matlab:
>
> ·In a subwindow print the function z=x-y+3 within domain [-2,2]X[-2,2] as a colored
> surface and using a grid of 25x20.
>
> So the problem is achieve the 25x20 grid,
>
> I try using:
> ezsurf ('x-y+3',[-2,2,-2,2])
>
> and in matlab help:
> ezsurf(...,n) plots f over the default domain using an n-by-n grid. The default value for n is 60.
>
> but i assume if i use that it will create square grid, not the 25x20 grid.
>
> Any hint for a newbie?
>
> Thx in advantage.

a hint:

help meshgrid;
help ndgrid;

us