How do I plot data from a matrix where column=r and row=theta?
Show older comments
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
Answers (1)
Walter Roberson
on 14 Mar 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);
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!