Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
After a certain value, I want the graph to make its way down to 0
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!