Not enough input arguments integral
3 views (last 30 days)
Show older comments
I have code,but get error:
i=complex(0,1);
f=@(t)26+sinh(t);
u110=exp^(i*(int(f,0,0)))/25;
0 Comments
Accepted Answer
Star Strider
on 18 Apr 2017
You need to use this form for the exponential function:
u110=exp(i*(integral(f,0,0)))/25;
If you have R2012a or later, use the integral function, not int (which is the Symbolic Math Toolbox integral function). If you are using an earlier version, use the quad function or its friends.
Also, you are integrating from 0 to 0, giving you an integral of 0, so you probably want to check that.
2 Comments
Star Strider
on 18 Apr 2017
The diff function in core MATLAB takes the differences between elements of a vector, and in the Symbolic MAth Toolbox calculates the symbolic derivative.
In either situation, there is only one element in ‘u210’, so there is no difference to take, so it returned the empty matrix for the difference, and would return 0 for the derivative (of a constant).
Please note that you are evaluating it from a lower limit of integration of 0 to an upper limit of integration of 0, giving you a result of 0.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!