First Order ode and simulink
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello, i want to ask. how i can fix this error? i have try to solve but still error. I want to solve this ode first order from that equation. Thank you![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/583286/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/583286/image.png)
0 comentarios
Respuestas (1)
Aiswarya
el 4 de Mzo. de 2024
Hi Hassan,
I understand that you are trying to solve a first order ODE using a derivative function. The function that you have provided has some syntactical and variable issues due to which you are getting the error message.
You may refer to the following modified code to resolve the errors:
function dCdt = F_O2(x);
kLa = x(1);
c1 = x(2);
t = 300;
Ce = 100;
dCdt = (kLa*Ce-c1)/t;
end
Based on your code and the inputs you are providing, your input variable "x" should be at least a two - dimensional vector for your code to work. An example call to the function would be:
F_O2([1 2])
You may also refer to this documentation for solving ODEs : https://www.mathworks.com/help/matlab/ref/ode.html
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations 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!