I am creating a skyplot. I would like to have different colorcodes for 3 sets and so like normally(which we generally do for plot function) wan't to use hold on and plot 3 sets on the same skyplot, but the error 'Using hold with skyplot is not supported.' appears. Is there an alternative function to hold on/hold off?

 채택된 답변

Chunru
Chunru 2021년 12월 14일

0 개 추천

gnss = gnssSensor;
pos = [0 0 0];
vel = [0 0 0];
[~, ~, status] = gnss(pos, vel);
satAz = status.SatelliteAzimuth;
satEl = status.SatelliteElevation;
% Use GroupData property
skyplot(satAz,satEl, GroupData=categorical([1 1 1 2 2 2 3 3]))
legend("1","2","3")

댓글 수: 4

parmesh duvuru
parmesh duvuru 2021년 12월 14일
I am actually trying to plot a trace of data based on PRN of satellites (huge matrices for both azimuth and elevation angles) , so in this case how can i use categorical?
Chunru
Chunru 2021년 12월 14일
How do you define which satellite belongs to which group? Or you can provide the data?
parmesh duvuru
parmesh duvuru 2021년 12월 14일
s1=[az1,az2,az3,az5];
ae1=[el1,el2,el3,el5];
as2=[az6,az7,az8,az9,az10,az13,az16];
ae2=[el6,el7,el8,el9,el10,el13,el16];
as3=[az11,az12,az14];
ae3=[el11,el12,el14];
h1=skyplot(as1,ae1,'MarkerSize',3);
h2=skyplot(as2,ae2,'MarkerSize',3);
h3=skyplot(as3,ae3,'MarkerSize',3);
What I meant is ...How can I merge these h1,h2,h3 plots ? where az and el are azimuth and elevation angles matrices.
as1=[az1,az2,az3,az5];
ae1=[el1,el2,el3,el5];
as2=[az6,az7,az8,az9,az10,az13,az16];
ae2=[el6,el7,el8,el9,el10,el13,el16];
as3=[az11,az12,az14];
ae3=[el11,el12,el14];
asall = [as1 as2 as3];
aeall = [ae1 ae2 ae3];
g = [onse(size(as1)) ones(size(as2))+1 ones(size(as3))+2];
h=skyplot(asall, aeall, MrkerSize=3, GroupData=categorical(g));

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Satellite and Orbital Mechanics에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 12월 14일

댓글:

2021년 12월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by