How to plot the contour of a circle, when the data are stored as vectors from the origin.

3 views (last 30 days)
I have data for different positions on the cross section of circle.
The data is a vector from the origin to the edge of the circle.
How to genreate a contour or surface plot from these data?
The 8 position of the vectors (grades) 0 45 90 135 180 225 270 315
Typical profile of one vector, 100 readings from origin to the edge.
573,638050000000 566,626350000000 570,091550000000 556,279850000000 551,207650000000 547,890500000000 552,846450000000 549,683100000000 551,153300000000 547,890500000000 539,793050000000 554,520450000000 558,020450000000 554,520450000000 549,479300000000 554,520450000000 551,153300000000 549,479300000000 563,080400000000 568,318350000000 554,520450000000 557,953850000000 552,916450000000 557,953850000000 543,012350000000 559,694450000000 551,153300000000 549,583650000000 541,373550000000 541,373550000000 531,902250000000 531,818000000000 525,608100000000 524,124000000000 513,541150000000 535,050200000000 507,703400000000 526,019800000000 509,137350000000 496,154550000000 535,606850000000 515,118500000000 499,133400000000 500,456400000000 501,990550000000 504,796900000000 493,420550000000 487,185200000000 474,587050000000 476,397600000000 493,710250000000 478,515750000000 481,011600000000 493,589550000000 499,355700000000 496,154550000000 487,949200000000 499,232200000000 486,481350000000 489,370650000000 447,002650000000 471,743400000000 479,707350000000 470,449450000000 482,384500000000 481,940450000000 442,059000000000 498,005850000000 444,724950000000 463,398800000000 450,579300000000 479,809700000000 470,631900000000 505,270350000000 481,022950000000 461,726700000000 463,398800000000 430,368050000000 455,258662500000 455,258662500000 455,258662500000 480,149275000000 466,500000000000 498,862525000000 425,712650000000 469,526500000000 445,525825000000 475,466700000000 485,476775000000 444,692650000000 459,092350000000 429,028350000000 449,781775000000 491,842600000000 455,251325000000 422,619075000000 422,945075000000 465,984750000000 420,073500000000 442,737975000000 473,618400000000
  2 Comments
Anders Carlestam
Anders Carlestam on 6 Aug 2014
Edited: Anders Carlestam on 6 Aug 2014
The 8 vectors (or as a 101x8 matrice), has all values similar to the example. I want to plot the contour/surface of these values on the base of a circle. In this example the center of the circle has low values and the edge of the circle has higher, and should be displayed as different colours or as different higths of a surface, from the origin to the edge.

Sign in to comment.

Accepted Answer

Ahmet Cecen
Ahmet Cecen on 6 Aug 2014
Edited: Ahmet Cecen on 6 Aug 2014
Your values are in polar form. You can contour plot them in a cartesian frame as x-axis=r and y-axis=angle in which case you would see circles as straight vertical lines.
Or, convert them to cartesian coordinates x=r*cos(angle) and y=r*sin(angle), then contour plot will show circles explicitly.
  2 Comments
Michael Haderlein
Michael Haderlein on 6 Aug 2014
So basically, it reads like
r=0:3;a=0:45:315;
[A,R]=meshgrid(a,r);
vals=rand(length(r),length(a));
[X,Y]=pol2cart(A*pi/180,R);
figure, surf(X(:,[1:end,1]),Y(:,[1:end,1]),vals(:,[1:end,1]),'facecolor','interp'), view(2)

Sign in to comment.

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!