How do I plot data from a matrix where column=r and row=theta?

I'm trying to figure out how to do a surface polar plot of my data. I have a 36*36 matrix of data points, where the row index of the matrix corresponds to r and the column index corresponds to angle (theta=0 to 360 degrees in steps of 10).
How would I go about plotting this data? I've googled many things but I've had no luck.
Thanks

Respuestas (1)

rvals = [.....] %the list of r values corresponding to row
thdegvals = [.....] %the list of theta values corresponding to column
thradvals = thedegvals .* (pi ./ 180);
[xvals, yvals] = pol2cart(thradvals, rvals);
surf(xvals, yvals, MatrixOfValues);

Productos

Preguntada:

el 14 de Mzo. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by