I am getting a straight line while running the following code. What is going wrong??
1 view (last 30 days)
Show older comments
x=0.1:0.001:10;
y=exp(-x.^2/2)/sqrt(x);
plot(x,y)
0 Comments
Accepted Answer
Azzi Abdelmalek
on 14 Feb 2014
Edited: Azzi Abdelmalek
on 14 Feb 2014
x=0.1:0.001:10;
y=exp(-x.^2/2)./sqrt(x);
plot(x,y)
It's ./ instead of /
0 Comments
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!