plotting all indices in a for loop
    7 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    shobhit mehrotra
 le 4 Sep 2014
  
    
    
    
    
    Réponse apportée : Star Strider
      
      
 le 4 Sep 2014
            i have this code
for n=1:35
A = sin(n*3)
B= cos(n^2)*3))
plot (A,B)
end
however when i plot it only plots the last point, how can i plot all of the points in the array?
0 commentaires
Réponse acceptée
  Star Strider
      
      
 le 4 Sep 2014
        This should work:
for n=1:35
A(n) = sin(n*3)
B(n) = cos(n^2)*3))
plot (A,B)
end
0 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur 2-D and 3-D Plots 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!

