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

3 views (last 30 days)
ramachandra rao
ramachandra rao on 5 Apr 2022
Commented: Walter Roberson on 5 Apr 2022
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)

Answers (1)

Cris LaPierre
Cris LaPierre on 5 Apr 2022
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 Comment
Walter Roberson
Walter Roberson on 5 Apr 2022
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.
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!