como ultrapassar esse erro
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
syms x
int (cos(x),x,-pi/2,pi/2);
Error using sym/subsindex
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function
body must be sym expression.
Error in indexing (line 1079)
R_tilde = builtin('subsref',L_tilde,Idx);
6 commentaires
Cris LaPierre
le 2 Avr 2023
Modifié(e) : Cris LaPierre
le 2 Avr 2023
Ejecuta el siguiente codigo y avisanos el resultado
which syms
which int
ver
Ha instalado el Symbolic Math Toolbox? Si no, y esta incluido en su licencia, lo puede instalar usando Add-Ons Explorer
Dyuman Joshi
le 2 Avr 2023
Cris, if the Symbolic Math Toolbox is not installed then it would give the following error - 'Undefined function 'syms' for input arguments of type 'char' after the first line/.
Réponses (1)
Cris LaPierre
le 2 Avr 2023
Parece que haya creado un variable llamado int.
% Para recrear el error (el mensaje es un poco diferente en R2023a
int=5;
syms x
int (cos(x),x,-pi/2,pi/2);
En R2022b, el mensaje es
Error using sym/subsindex
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body
must be sym expression.
Hay que vaciar el variable int
clear int
syms x
int(cos(x),x,-pi/2,pi/2)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!