How do I plot data from a matrix where column=r and row=theta?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Walter Roberson
2013년 3월 14일
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);
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!