how to plot f(x,y) = x^2/y, y>0
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Jetty Rakesh Aditya
 am 24 Mär. 2021
  
    
    
    
    
    Beantwortet: Jan
      
      
 am 24 Mär. 2021
            how can i plot the above problem in matlab ?
0 Kommentare
Akzeptierte Antwort
  Alan Stevens
      
      
 am 24 Mär. 2021
        Set the range of values of x and y of interest, then use meshgrid and surf
doc meshgrid
doc surf
2 Kommentare
Weitere Antworten (2)
  DGM
      
      
 am 24 Mär. 2021
        Perhaps an example will suffice.
% plot 2-x^2+y^2 for x=[-1,1], y=[-1,1]
x=linspace(-1,1,10);
y=linspace(-1,1,10);
[X Y]=meshgrid(x,y);
Z=2 - X.^2 + Y.^2;
surf(X,Y,Z)
0 Kommentare
  Jan
      
      
 am 24 Mär. 2021
        x = linspace(-10, 10, 100);
y = linspace(0, 10, 100).';
f = x .^ 2 ./ y;
surf(x, y, f)
0 Kommentare
Siehe auch
Kategorien
				Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



