Colors and Symbols for Loop Iteration
Afficher commentaires plus anciens
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
Réponses (2)
KALYAN ACHARJYA
le 14 Sep 2020
Modifié(e) : KALYAN ACHARJYA
le 14 Sep 2020
#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 commentaires
KALYAN ACHARJYA
le 14 Sep 2020
Modifié(e) : KALYAN ACHARJYA
le 14 Sep 2020
Sir there are so many threads in Answer Forumn related to legend in for loop plots. Please refer the followings-
A.J.M
le 14 Sep 2020
KALYAN ACHARJYA
le 14 Sep 2020
Welcome sir
Catégories
En savoir plus sur Legend dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
