Reiteration for multiple values of b

1 view (last 30 days)
Viktoria Kolpacoff
Viktoria Kolpacoff on 1 Oct 2015
Edited: Jan on 4 Oct 2015
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)

Categories

Find more on 2-D and 3-D Plots 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!