Plotting Data in a 3D polar plot

조회 수: 7 (최근 30일)
Ben Bladow
Ben Bladow 2018년 6월 26일
댓글: Anton Semechko 2018년 6월 27일
I would like to plot the attached data (regarding antenna gain for different frequencies) as a 3D polar plot and I was hoping to find some function that takes theta, phi, and a radius as input (like the built in polarplot MATLAB function). I have looked Ken Garrad's and J De Freitas' 3D polar plotting functions but I don't know how to get my data formatted so that I can use their functions. I am relatively new to MATLAB so any help is much appreciated. I tried converting to Cartesian corrdinates and then plotting the data, but it does not display the data as clearly as I want.
  댓글 수: 5
Ben Bladow
Ben Bladow 2018년 6월 26일
편집: Ben Bladow 2018년 6월 27일
1) Those are the different frequencies tested for gain, i.e. 820 MHz.
2) Same radial distance and same spatial directions (I believe... if I understand your question correctly).
Anton Semechko
Anton Semechko 2018년 6월 27일
Ok. So let's take the "data block" in 'data.xls' for 820 Hz, what are the Cartesian coordinates of the samples in cells C3 to C39? Please post the code used to obtain the answer on here.

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

답변 (1개)

KSSV
KSSV 2018년 6월 26일
[num,txt,raw] = xlsread('data.xls') ;
th = num(1,3:end) ;
phi = num(3:39,3:end) ;
th = repmat(th,size(phi,1),1) ;
u = sin(th).*cos(phi) ;
v = sin(th).*sin(phi) ;
quiver(u,v)
  댓글 수: 1
Ben Bladow
Ben Bladow 2018년 6월 26일
Hey, thanks for the response. I tried out your code and I don't think a quiver graph helps make the data more visually readable. Of course it might just be because I don't know how to read one...

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by