matlab funtion using "for loop" in simulink

1 visualización (últimos 30 días)
Neeta Khare
Neeta Khare el 1 de Jun. de 2016
Comentada: Bhushan Ravindra Attarde el 7 de Mayo de 2020
Hi there, I am using simple "for loop" (see below) in Simulink using Matlab function block. I code simply work in workspace without error. however does not work as Matlab function in Simulink block. Can anyone help me with this. Thanking you in advance,
function P = P(I, del_t)
for i=1:10000
capn = 20.6;
sigma = -0.14;
row = 0.6436;
soc(i+1) = soc(i) + (I*del_t)/((capn+sigma)+row);
end
P = SOC(i+1);
end
  1 comentario
Bhushan Ravindra Attarde
Bhushan Ravindra Attarde el 7 de Mayo de 2020
Hi Neeta,
I am facing the same issue. Did you get solution for this issue?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by