hi, i wanna plot gaussion shape function with any arbitrrary number . how can i plot that?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mili Kian
am 17 Aug. 2020
Beantwortet: Alan Stevens
am 17 Aug. 2020
hi, i wanna plot gaussion shape function with any arbitrrary number .
how can i plot that?
f(x) = a*exp(-(x-b).^2)/2*(c.^2);
0 Kommentare
Akzeptierte Antwort
Alan Stevens
am 17 Aug. 2020
Define it as a function:
f = @(x,a,b,c) a*exp(-(x-b).^2)/(2*c^2);
then define your constants a, b and c, specify the range of values of x, call the function and plot the results. For example
a = 1; b = 2; c = 3;
x = -2:0.1:8;
y = f(x,a,b,c);
plot(x,y)
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!