Error with integration Not enough argument
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I add a pic of the problem help really needed,thanks.
2 comentarios
Mohammad Sami
el 27 de Feb. de 2020
There is no function called int in matlab.
You can either use the function cumtrapz (for numerical data) or integral (for function handle)
See the topic in help file below
Respuestas (1)
Walter Roberson
el 27 de Feb. de 2020
We cannot see how you created t but the error message tells us that y2 is double precision, and that could only happen if t is double precision.
The symbolic toolbox contains int() but it requires a symbolic expression or symbolic function as its first parameter. If for example you had done
syms t
then the way you create y2 would be valid to pass to int()
Perhaps you have initialized t as a numeric vector and were hoping for numeric integration over the vector. int() is only for symbolic integration, not numeric integration. Numeric integration of an existing numeric vector can be done in various ways including by using trapz()
0 comentarios
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!