开发者

Calculating derivative and integration using matlab

开发者 https://www.devze.com 2023-03-02 23:15 出处:网络
I am trying to find second derivative of a function, but while initializing my symbols i am getting the following error:

I am trying to find second derivative of a function, but while initializing my symbols i am getting the following error:

Error using ==> subsindex
Function 'subsindex' is not defined for valu开发者_StackOverflow中文版es of class 'sym'.

The commands I am using are:

syms x a b c L;
u = (a*x(x-L))+(b*x((x^2)-(L^2)))+(c*x((x^3)-(L^3)));

"u" is my function.


I don't know much about MATLAB's symbolic capabilities, but that error is coming from the pieces like

x(x-L)

which MATLAB is interpreting as an indexing operation. Did you mean multiplication there? I.e.

x*(x-L)
0

精彩评论

暂无评论...
验证码 换一张
取 消