我正在尝试找到函数的二阶导数,但是在初始化我的符号时,我收到以下错误:
Error using ==> subsindex
Function 'subsindex' is not defined for values of class 'sym'.
我使用的命令是:
syms x a b c L;
u = (a*x(x-L))+(b*x((x^2)-(L^2)))+(c*x((x^3)-(L^3)));
“
u
”是我的职责。
我不太了解 MATLAB 的符号功能,但该错误来自于
x(x-L)
MATLAB 将其解释为索引操作。你指的是乘法吗?即
x*(x-L)