Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

for loop in openmmodelica

for loop in openmmodelica

hi,

   I want to translate this for loop from matab to openmodelica

Code:


Ia=zeros(size(Vc))
for j=1:5
Ia = Ia - (Iph - Ia - Ir .* ( exp((Vc + Ia .* Rs) ./ Vt_Ta) -1))./ (-1 - Ir * (Rs ./ Vt_Ta) .* exp((Vc + Ia .* Rs) ./ Vt_Ta))
end

can any one help me please?

thank you in advance



Edited by: Abderezakabidi - Jan-01-20 16:18:39
There are 0 guests and 0 other users also viewing this topic