Substituting variable into equation
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rakesh Jain
le 11 Fév 2017
Commenté : Walter Roberson
le 11 Fév 2017
I am attaching a snippet of the program which I am doing.
yt = ilaplace(y_syms)
syms t
yred = ilaplace(r)
syms t A1
eqn = limit(yt,t,inf)==limit(yred,t,inf);
A1 = solve(eqn,A1)
error = yt - yred
I calculated the value of A1 using solve command as above. My error is a function of A1 and t. But the value of A1 calculated using 'solve' is not getting substituted automatically into error equation. What should be the way out.
0 commentaires
Réponse acceptée
Walter Roberson
le 11 Fév 2017
subs(error, sym('A1'), A1)
Note: please do not use "error" as the name of a variable. "error" is a key MATLAB routine to control handling of error conditions; https://www.mathworks.com/help/matlab/ref/error.html
2 commentaires
Walter Roberson
le 11 Fév 2017
I do not know. I have not encountered one myself, but since there are over 4 billion web sites, I have not had time to check.
Plus de réponses (0)
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!