First Order solving ODE and simulink

1 visualización (últimos 30 días)
Hassan Aqwa
Hassan Aqwa el 14 de Abr. de 2021
Comentada: Hassan Aqwa el 27 de Abr. de 2021
Hello, i want to ask regarding this error. It is from solving first order and simulink. May i know where did error i did and how to solve it. Thankyou.

Respuesta aceptada

Divija Aleti
Divija Aleti el 22 de Abr. de 2021
Hi Hassan,
Firstly, as you are defining all the variables inside the function, you do not need to pass them as the function's arguments.
Secondly, you are getting an error as you did not define the variable 'C' in your code. Have a look at the following code.
function dCdt = F_O()
t = 300;
Ce = 100;
C = 1; % Define the variable 'C' by giving it some value. As an example I gave C=1.
kLa = 0.0285;
dCdt = (kLa*Ce-C)/t;
end
Hope this helps!
Regards,
Divija
  2 comentarios
Hassan Aqwa
Hassan Aqwa el 26 de Abr. de 2021
Thank you Divija!
Hassan Aqwa
Hassan Aqwa el 27 de Abr. de 2021
Divija, i want to ask. In this equation, i want to define the C which is i have to find the value of C. so, thats why i didn't define the variables of C. So, how ya?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre General Applications 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