Info

この質問は閉じられています。 編集または回答するには再度開いてください。

After a certain value, I want the graph to make its way down to 0

1 回表示 (過去 30 日間)
Dipesh
Dipesh 2012 年 10 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
So I have created a loop, and everything works fine except that sometimes the graph finishes half way up the page as my value of N that it needs to choose from is 0. What I therefore want it do if this happens, then I want to just go down for at random intervals. I created a for loop:
for N(step) = 0;
t(step + 1) = t(step) + B;
I(step + 1) = I(step) - 1;
end
where t is the value along the x axis and I is the value on the y axis. What I thought this would do is say that when N = 0, with random time along the x axis, the value on the y axis will just keep dropping by 1 and then eventually equal 0.
But I keep getting an error message saying there is an unblanced or unexplained parenthesis or bracket. I have already defined N(1) = 100 and N(step + 1) = N(step) - 1, so why does it keep saying?

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by