Please How I can use meshgrid with x and y are the elements of the matrix A and plot a figure like in the picture
    7 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Abdelkader Hd
 il 9 Ago 2022
  
    
    
    
    
    Commentato: Abdelkader Hd
 il 9 Ago 2022
            x = linspace(0,3);
y = linspace(-2*pi,2*pi);
[X,Y] = meshgrid(x,y);
A=[x,2;0,y];
Z = exp(det(A)) + cos(Y);
contourf(X,Y,Z)

0 Commenti
Risposta accettata
  Walter Roberson
      
      
 il 9 Ago 2022
        
      Modificato: Walter Roberson
      
      
 il 9 Ago 2022
  
      This does not look like a contour plot at first, but notice the upper right corner.
syms P Q
D = det([P, 2; 0, Q]);
x = linspace(0,3);
y = linspace(-2*pi,2*pi);
[X,Y] = meshgrid(x,y);
A = double(subs(D, {P,Q}, {X, Y}));
Z = exp(A) + cos(Y);
contourf(X, Y, Z)
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Contour Plots in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


