Question

Je suis en train de trouver la dérivée seconde d'une fonction, mais lors de l'initialisation mes symboles je reçois l'erreur suivante:

Error using ==> subsindex
Function 'subsindex' is not defined for values of class 'sym'.

Les commandes que je utilise sont:

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

"u" est ma fonction.

Était-ce utile?

La solution

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)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top