why can't I see line in the plot?

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)

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

Asked:

on 14 Nov 2017

Answered:

on 15 Nov 2017

Community Treasure Hunt

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

Start Hunting!