|
TideMan <mulgor@gmail.com> wrote in message <ae671a5b-9321-4e3b-b607-100f945ff8b2@googlegroups.com>...
> On Sunday, July 22, 2012 10:25:17 AM UTC+12, Surafel wrote:
> > I was trying to plot a graph as follows:
> >
> > [x,y]=meshgrid(-5.12:0.01:5.12);
> > z=round(x)+round(y);
> > meshc(z)
> >
> > the problem is that it plots the graph on the axis for x and y from 0 to 1200, i cant spot the problem, i appreciate any help. thnx
>
> But in your call to meshc, you haven't told Matlab what x and y are, so he just uses the indices
> Try
> meshc(x,y,z)
Right, thnx!
|