Colors and Symbols for Loop Iteration

조회 수: 2 (최근 30일)
A.J.M
A.J.M 2020년 9월 14일
댓글: A.J.M 2020년 9월 14일
Good Day,
I want to plot PDF_Hp with respect to Hp, how can I set differnt colors and symbols for each curve.
for i=1:length(Rytov_var)
for j=1:length(Hp)
A1=1./(Hp(j).*sqrt(2*pi*Rytov_var(i)));
A2=((log(Hp(j))+0.5.*Rytov_var(i)).^2)./2.*Rytov_var(i);
PDF_Hp(i,j)=A1.*exp(-(A2));
end
end

답변 (2개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 9월 14일
편집: KALYAN ACHARJYA 2020년 9월 14일
#Example: you can set as per your requirements.
color_sym={'rx','go','b-','m--'};
for i=1:4
plot(rand(1,10),rand(1,10),color_sym{i})
hold on;
end
  댓글 수: 4
A.J.M
A.J.M 2020년 9월 14일
Thanks Mr. KALYAN ACHARJYA .
KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 9월 14일
Welcome sir

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


KSSV
KSSV 2020년 9월 14일
figure
surf(PDF_Hp)
shading interp
figure
pcolor(PDF_Hp)
shading interp
figure
plot(PDF_Hp)
figure
waterfall(PDF_Hp)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by