Invalid indexing when simplifying a symbolic expression
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to somplfy an expression using the script below.
clc,clear
syms k4f k3f k3r k2f k2r C E0 S
eqn = k4f*(E0 - E0*(k3r+k4f) / (((k3f*k2f*C*S)/k2r)+(k3r*k4f)*(1+k2f*C/k2r)) - E0*k2f*C(k3r+k4f) / k2r*(((k3f*k2f*C*S)/k2r)+(k3r*k4f)*(1+k2f*C/k2r)));
simplfy(eqn)
When trying to simplfy "eqn", I get the following error messages...
Error using sym/subsindex (line 814)
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 sym/subsref (line 859)
R_tilde =
builtin('subsref',L_tilde,Idx);
Error in Simplify_Eqn (line 3)
eqn = k4f*(E0 - E0*(k3r+k4f) /
(((k3f*k2f*C*S)/k2r)+(k3r*k4f)*(1+k2f*C/k2r)) -
E0*k2f*C(k3r+k4f) /
k2r*(((k3f*k2f*C*S)/k2r)+(k3r*k4f)*(1+k2f*C/k2r)));
>>
Any help is appreciated!
1 commentaire
Réponses (1)
Voir également
Catégories
En savoir plus sur Calculus 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!