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.

 채택된 답변

Divija Aleti
Divija Aleti 2021년 4월 22일

0 개 추천

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

Hassan Aqwa
Hassan Aqwa 2021년 4월 26일
Thank you Divija!
Hassan Aqwa
Hassan Aqwa 2021년 4월 27일
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?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

질문:

2021년 4월 14일

댓글:

2021년 4월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by