why can't I see line in the plot?
Show older comments
x= [-2, 4];
y= 0.6*(x.^3)*(exp(-0.47*x))+1.5*(x.^2)*(exp(-0.6*x));
plot(x,y)
%also I need the plot in this interval [-4:8]; but I want to figure out what is the problem here first
Answers (1)
Akira Agata
on 15 Nov 2017
You should slightly modify the second line by:
y= 0.6*(x.^3).*(exp(-0.47*x))+1.5*(x.^2).*(exp(-0.6*x));
Then you can obtain the plot. But to plot a meaningful graph, you should do like this.
x = linspace(-2,4);
y= 0.6*(x.^3).*(exp(-0.47*x))+1.5*(x.^2).*(exp(-0.6*x));
plot(x,y)
Categories
Find more on Line 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!