HOW TO PLOT GAUSSIAN DISTRIBUTION FUNCTION y= y=a exp(-(y-b)^2/ 2c^2) in matlab coding.

hi all... can someone help me to answer my question. Im already out of time right now to finish this project...

 Accepted Answer

a = rand;
b = rand;
c = rand;
y = @(x) a .* exp(-(x-b).^2 ./ (2*c^2));
fplot(y)

2 Comments

After I run your code, there are some error
Error using fplot (line 51) Not enough input arguments.
Error in Untitled4 (line 5) fplot(y)
Can you help me to fix this?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!