Plotting array elements in different colors
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Gova ReDDy
le 8 Avr 2014
Réponse apportée : Azzi Abdelmalek
le 8 Avr 2014
Hello,
Can someone explain how to plot the array elements in different colours I mean how to plot the array elements like from 1:500 in red color then 501:1000 in blue colour 1001:1500 in different colour.
Thankyou.
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 8 Avr 2014
x=1:1500;
y=rand(1,1500);
plot(x(1:500),y(1:500),'r')
hold on
plot(x(501:1000),y(501:1000),'b')
plot(x(1001:1500),y(1001:1500),'k')
hold off
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!