How do I make a graph from this integral?
1 view (last 30 days)
Show older comments
D = input('0-100');
y = 0:D;
p = 62.5;
g =@(y) (40-20.*exp(-(0.01.*y).^2)).*p.*(D-y);
T = integral(g, 0, D)
This first part works as intended, I've confirmed this, but the plot that's supposed to show the integral on the y-axis and D (from 0-100, not y) on the x-axis doesn't.
D = 0:100;
plot(D,T,'*')
xlim([10 100])
I get a horizontal line. So the integral seems "stuck" at that value while D changes from 0 to 100. I'm a total newbie so please be gentle!
0 Comments
Answers (0)
See Also
Categories
Find more on Graphics Performance 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!