フィルターのクリア

how to create an discrete equation

14 ビュー (過去 30 日間)
Seungil Oh
Seungil Oh 2020 年 8 月 5 日
回答済み: Surya Talluri 2020 年 8 月 10 日
my question is how to creat discrete equations, calculate them and put the created discrete equations in each other such that i get an final diskrete equation
For example:
I. y_1(k) = a*y_1(k-1)+b*x_1(k-1)
II. y_2(k) = c*y_2(k-1) + d*y_1(k-1)
Final equation: y_2(k) = c*y_2(k-1) + d*a*y_1(k-2) + d*b*x_1(k-2)
** The values of x_1, i can get from the data set x_1 and for k = 1, y_1(k-1) = 0
** I would like to realize it into "sym".
thank you in advance
  1 件のコメント
Rik
Rik 2020 年 8 月 5 日
What have you tried so far?

サインインしてコメントする。

回答 (1 件)

Surya Talluri
Surya Talluri 2020 年 8 月 10 日
I understand that you want to create discrete functions using Symbolic Math Toolbox. You can implement it by creating symbolic functions x_1(k), y_1(k), y_2(k)
syms a b c d x_1(k) y_1(k) y_2(k)
y_1(k) = a*y_1(k-1)+b*x_1(k-1);
y_2(k) = c*y_2(k-1) + d*y_1(k-1);
y_2(k)
ans =
c*y_2(k - 1) + d*(a*y_1(k - 2) + b*x_1(k - 2))
For replacing x_1 values, you can use “subs” function.
You can refer to following documentation for further understanding:

カテゴリ

Help Center および File ExchangeFormula Manipulation and Simplification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by