How to Plot 3 variable into a Surface (3D) ?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sarit Hati
am 9 Jan. 2017
Bearbeitet: Sarit Hati
am 9 Jan. 2017
Suppose I have 3 variables a,b,c.Now 'a' depends on both 'b' & 'c'.How to plot 'a' with the variations of 'b' & 'c'. a = function(b,c).
**note = dimensions of a,b,c are (1,n).
Help Please!
0 Kommentare
Akzeptierte Antwort
KSSV
am 9 Jan. 2017
clc; clear all ;
x = -4:1:4; % The range of x values.
y = -4:1:4; % The range of y values.
[X,Y] = meshgrid (x,y); % This generates the actual grid of x and y values.
% Generating the Z Data
Z=Y.^2+X.^2; % The function we're plotting.
figure(1); % Generating a new window to plot in.
surf(X,Y,Z) % The surface plotting function.
0 Kommentare
Weitere Antworten (0)
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!