필터 지우기
필터 지우기

How to connect the points in an polar plot?

조회 수: 4 (최근 30일)
Ashim
Ashim 2014년 7월 17일
댓글: Matz Johansson Bergström 2014년 7월 17일
I am trying to plot a hodograph plot as shown below. With the heklp of polar plot i could plot the points, however, i don't know how to connect a spline in between those points. Is it possible to do it somehow. I am posting my MWE.
Nomenclature:
  • Ws - wind speed in m/s
  • Wd - wind direction in degrees
  • H - height for which the points are present in m
Ws = 15.*rand(10,1);
Wd = 360.*rand(10,1);
H = (20:20:200)';
Wd = Wd.*(pi/180);
[WdX, WsY] = pol2cart(Wd, Ws);
polar(WdX, WsY,'-b*');

채택된 답변

Matz Johansson Bergström
Matz Johansson Bergström 2014년 7월 17일
Have you tried to connect your points with splines? See http://www.mathworks.se/help/matlab/examples/splines-in-two-dimensions.html for an example.
  댓글 수: 2
Ashim
Ashim 2014년 7월 17일
Oh Thanks Matz....
I was actually working with splines but through the interp1 function. However, was not getting the way i wanted it.
I tried working with the example you showed and applied it on my example and it works perfectly. Will be conditioning it further to get the best results but so far, thats a good step.
Thanks and keep the good work
Matz Johansson Bergström
Matz Johansson Bergström 2014년 7월 17일
No problem, glad I could be of help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by