counting the correct interval and stop at the end of it

2 Ansichten (letzte 30 Tage)
Gali Musa
Gali Musa am 21 Jul. 2018
Bearbeitet: KALYAN ACHARJYA am 30 Jul. 2018
Pd = 480; inter = 18; Cap = 200; hrs = 8640; initial = Cap; yyyy(1) = initial; yyy(1) = 0;
for e_ref = Pd:Pd:hrs for t=1:inter
if Pd(Pd >= 72 & Pd < 120)
yyy(t+1) = ((-0.00005667*e_ref(t) + 100)/100);
yyyy(t+1) = yyy(t+1)*Cap;
e_ref(t+1) = e_ref(t) + Pd;
elseif Pd == 480
yyy(t+1) = ((-0.00008999*e_ref(t) + 100)/100);
yyyy(t+1) = yyy(t+1)*Cap;
e_ref(t+1) = e_ref(t) + Pd;
end
end
end
  1 Kommentar
KALYAN ACHARJYA
KALYAN ACHARJYA am 21 Jul. 2018
error in the code, pls provide the correct code, so that user help you easily.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 21 Jul. 2018
%insert the following code within for loop, when Pd becomes 480, the loop execution stop
if Pd==480
return;
end
  3 Kommentare
Gali Musa
Gali Musa am 21 Jul. 2018
Bearbeitet: Gali Musa am 21 Jul. 2018
i have sorted out the problem..... Thank you
KALYAN ACHARJYA
KALYAN ACHARJYA am 30 Jul. 2018
Bearbeitet: KALYAN ACHARJYA am 30 Jul. 2018
OK, Unable to a response you on time.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by