subvar
Version 1.0.0.0 (2,03 KB) von
Per-Anders Ekstrom
Symbolic variable substitution in expression.
SUBVAR(S,OLD,NEW) replaces OLD with NEW in the expression S.
OLD is a string or cell of strings representing variable names to be substituted by NEW in the expression S.
Only variables defined as using SYMVAR are substituted. That is in expressions like 'f(1)', SUBVAR interprets the symbol 'f' as a function call, not as an index into a symbolic variable.
Example:
subvar('sin(a*exp(2.3*-b))+a',{'a','b'},{'u(1)','u(2)'})
returns 'sin(u(1)*exp(2.3*-u(2)))+u(1)'
Zitieren als
Per-Anders Ekstrom (2026). subvar (https://de.mathworks.com/matlabcentral/fileexchange/13832-subvar), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R2006a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und MATLAB Answers
Tags
Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.0.0 |
