From: Peta on
Hello,

I keep getting an error message saying the following while I'm trying to create a contour plot:

??? Error using ==> griddata at 53
X and Y must both be vectors or both be matrices.

Error in ==> ContourData at 129
Z = griddata(x,y,z,X,Y,'cubic');

However X and Y are both matrices, they were created with meshgrid().
Could it be that they are too big? They are both <259200×18 double>.
If it's not that then can anyone please help me figure out why matlab doesn't like it?

Thanks

Peta
From: John D'Errico on
"Peta " <petie4u(a)hotmail.com> wrote in message <ht2j5o$3ji$1(a)fred.mathworks.com>...
> Hello,
>
> I keep getting an error message saying the following while I'm trying to create a contour plot:
>
> ??? Error using ==> griddata at 53
> X and Y must both be vectors or both be matrices.
>
> Error in ==> ContourData at 129
> Z = griddata(x,y,z,X,Y,'cubic');
>
> However X and Y are both matrices, they were created with meshgrid().
> Could it be that they are too big? They are both <259200×18 double>.
> If it's not that then can anyone please help me figure out why matlab doesn't like it?
>

Yes. But what are x and y? Look at them. READ the
help. What does griddata call the first two arguments?

John