Reiteration for multiple values of b

Hello, I am trying to write a reiteration program. I am supposed to have 25 values, 5 for each value of 'b'. And then, I need to plot the 5 values computed for each value of 'b' on the same graph. But, I am not sure where to go from here. Any help would be appreciated.
p = 50;
n = 5;
b = [0.5 0.9 1.0 1.1 1.5];
for i = length(b);
for t = 1:n;
b(i+1) = p*b(i)
end
end

1 Comment

Jan
Jan on 4 Oct 2015
Edited: Jan on 4 Oct 2015
What exactly is your question? What do you want to plot? Shouldn't the inner loop depend on the value of "t"? What is the wanted output?

Sign in to comment.

Answers (0)

Asked:

on 1 Oct 2015

Edited:

Jan
on 4 Oct 2015

Community Treasure Hunt

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

Start Hunting!