ploting a 2D graph with multiple lines
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    danielle sisserman
 il 12 Nov 2020
  
    
    
    
    
    Commentato: Ameer Hamza
      
      
 il 16 Nov 2020
            Hi, I'm a bigginer and what I need is too specific.
I need to plot a graph that looks exaclty like this:

I have a h vector of size 4. a matrix X of size 4x39 and a matrix f(x) of size 4x39.
each line represents the ploting of row i in matrix X with corresponding row i in matrix f(x) for h(i).
Can someone please tell me how to plot this?
Thank you
0 Commenti
Risposta accettata
  Ameer Hamza
      
      
 il 12 Nov 2020
        
      Modificato: Ameer Hamza
      
      
 il 12 Nov 2020
  
      Something like this
X; % 4x39
f; % 4x39
h; % 4x1
plot(X.', f.')
xlabel('x')
ylabel('(approximate) f(x)')
legend_strs = compose('Approximate f with h=%.2f', h)
legend(legend_strs)
6 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Line Plots in Help Center e File Exchange
			
	Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




