|
"Joe McGlinchy" <jxm8863@rit.edu> wrote in message <gl33bq$hi4$1@fred.mathworks.com>...
> Hi everyone,
>
> I am trying to polar format a phase history data set down to a rectangular grid to form an image. The data set is complex valued, but I have read that shouldn't matter using griddata. The data set is an 1800x1999 array. I have attempted to compute the location of each sample in the frequency domain in polar coordinates, convert that to rectangular, and use griddata from there. I am getting errors for OUT OF MEMORY, and errors using qhullmx as well. here is my code as of now
>
> %number of samples per pulse, 1800. 1999 pulses
> rf = Beff*(double((0.0:1.0:nsamps-1))-nsamps/2)/nsamps + Bc;
> thetaf = dtheta*double((0.0:1.0:npulses-1))/npulses+theta_1;
>
> [thetaF,rF] = meshgrid(thetaf,rf);
>
> [X,Y] = pol2cart(thetaF,rF);
>
> XI = (0:10:1800);
> YI = (0:10:1999)';
> Z = phase_vector;
> ZI = griddata(X,Y,Z,XI,YI,'nearest');
>
> is there a problem with the arguments X,Y in griddata being matrices instead of row and column vectors? the help file in matlab is not too helpful in describing the format the arguments need to be in.
>
> Any help would be appreciated, thanks!
>
> Joe
Hello Joe,
help griddata says:
ZI = GRIDDATA(X,Y,Z,XI,YI) fits a surface of the form Z = F(X,Y) to the
data in the (usually) nonuniformly-spaced vectors (X,Y,Z). GRIDDATA
interpolates this surface at the points specified by (XI,YI) to produce
ZI. The surface always goes through the data points. XI and YI are
usually a uniform grid (as produced by MESHGRID) and is where GRIDDATA
gets its name.
XI can be a row vector, in which case it specifies a matrix with
constant columns. Similarly, YI can be a column vector and it specifies
a matrix with constant rows.
So, from here, my understanding is that X, Y and Z should be vectors, and XI, YI defined in your code looks fine.
1800*1999 is maybe too large to fit on a figure, but I cannot say for sure. It depressed my laptop, too. :))
|