How do I plot data from a matrix where column=r and row=theta?
Mostrar comentarios más antiguos
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)
Walter Roberson
el 14 de Mzo. de 2013
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);
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!