How do i generate a multiple gaussian surface like this shown in the figure.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
KOMALA PAWAR
am 10 Mär. 2016
Beantwortet: Star Strider
am 10 Mär. 2016

since I'am new to matlab i dont know how to define an equation z for multiple gaussians like shown in the attached figure.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 10 Mär. 2016
One approach:
x = linspace(-5, 5, 50);
[X,Y] = meshgrid(x);
fcn = @(x,y,a,b) exp(-((x.^2+a) + (y.^2+b))*0.2); % Parameters ‘a’ & ‘b’ Are Offsets
figure(1)
mesh(X,Y,fcn(X,Y,0,0))
hold on
mesh(X+5,Y+5,fcn(X,Y,5,5)*12)
mesh(X+5,Y+10,fcn(X,Y,5,10)*10)
mesh(X+10,Y+5,fcn(X,Y,10,5)*10)
hold off
grid on
Experiment to get the result you want.
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!