How to fix the following error while writing matlab code for definite integral

Please see the below error message in code
Check for incorrect argument data type or missing argument in call to function 'int'.
Error in ode_sys1 (line 45)
diffeqs(4,1)=-3*rohc*kv*G*int((l.^2*N),l,0,inf)-(Ksr.*Cc);

Risposte (1)

It would appear the first input to int is not a symbolic expression.
See here. Look at these examples for how to use int.

1 Commento

Looking at the function name, ode_sys1 it seems plausible that the code is being invoked by ode45() or similar. In such a case, the inputs to the function would be competely numeric.
diffeqs(4,1)=-3*rohc*kv*G*int((l.^2*N),l,0,inf)-(Ksr.*Cc);
If N is not a function of l then we can see that the integral would be infinite.
If N is a function of l then we cannot make a general prediction.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by