필터 지우기
필터 지우기

Substituting variable into equation

조회 수: 2 (최근 30일)
Rakesh Jain
Rakesh Jain 2017년 2월 11일
댓글: Walter Roberson 2017년 2월 11일
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.

채택된 답변

Walter Roberson
Walter Roberson 2017년 2월 11일
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
Rakesh Jain
Rakesh Jain 2017년 2월 11일
Is there any sample program or toolbox available in matlab to perform model reduction of a system using Genetic algorithm
Walter Roberson
Walter Roberson 2017년 2월 11일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by