lambda=1
gamma1=0.3
n=0:1:15;
for i=1:15
n=0+i;
P1(n)=((lambda.^n)/(lambda+gamma1).^(n+1));
end
After running this program, in the command box i typed plot(P1(:)). The curve starts from 1 and not from zero. please help me to find the mistake in the program.
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/591823-plotting-functions-using-loop#comment_1004506
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/591823-plotting-functions-using-loop#comment_1004506
Sign in to comment.