From: Anders on
I have unstructured [x y z] data from CFD calculations, and would like to convert them to a rectangular meshed grid. - is that possible?

I'm thinking of something like

N = 50; M = 5;
x = rand(1,N);
y = rand(1,N);
z = rand(1,N);

[Xi Yi] = meshgrid(linspace(0,1,M));
Zi = interpUNSTRUCTURED(x,y,z,Xi,Yi)

regards,
anders
From: John D'Errico on
"Anders " <anders.ht(a)gmail.com> wrote in message <hgac3f$rg8$1(a)fred.mathworks.com>...
> I have unstructured [x y z] data from CFD calculations, and would like to convert them to a rectangular meshed grid. - is that possible?
>
> I'm thinking of something like
>
> N = 50; M = 5;
> x = rand(1,N);
> y = rand(1,N);
> z = rand(1,N);
>
> [Xi Yi] = meshgrid(linspace(0,1,M));
> Zi = interpUNSTRUCTURED(x,y,z,Xi,Yi)
>
> regards,
> anders

griddata is a place to start. Or download gridfit from
the FEX to give a smoother surface directly.

http://www.mathworks.com/matlabcentral/fileexchange/8998

John
From: Anders Holtze Thomsen on
Fantastic!
once again you saved me John!

best wishes from Copenhagen, anders