Plotting of graph with multiple curve
Show older comments
for a function with 2-unknown parameter, I wrote this code below. Is there any way it can be improved?
clear all
q=.9;
x = linspace(0,10);
for i1 = 1:4
b = input('input the shape parameter beta b');
f = zeros(1,4);
for ii = 1:length(x)
f(ii) =b*q^2/(q+1)*(1+b*x(ii))*exp(-b*q*x(ii));
end
plot(x,f,'linewidth',2)
hold on
end
legend('\beta=.05','\beta=.02','\beta=.5')
hold off
Thank for helping to learn MATLAB Package.
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!