MATlab wont do integrate command

1 次查看(过去 30 天)
Matlab only gives errors when the script is:
int(x)
%or
int(x,x)
%or
int(x+5,x)
I just want to get answers such as .5x^2, or .5x^2+5x.
The error is: Undefined function 'int' for input arguments of type 'double'.
I have Symbolic Math Toolbox Version8.2 (R2018b) running

采纳的回答

Asad Mirza
Asad Mirza 2019-2-24
编辑:Asad Mirza 2019-2-24
You have to first initialize x as a symbolic variable. You can find more information and examples here.
syms x
f = .5*x^2
int(f)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by