Plotting in 3d
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How do I plot z=1/sqrt(x^2+y^2) in Matlab?
0 Kommentare
Antworten (2)
Alexander
am 31 Jul. 2020
x = 1:0.1:10;
y = 1:0.1:10;
[X,Y] = meshgrid(x,y);
Z=1./sqrt(X.^2+Y.^2);
imagesc(x,y,Z)
4 Kommentare
Alexander
am 31 Jul. 2020
as an example, I plotted x/y in 1 to 10 range. You can substitute with whatever ranges you need. "0.1" is the step for x/y variables. x = 1:0.1:10 creates a vector of number [1 1.1 1.2 ..... 9.9 10].
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!