extract num and den from matrix transfer function

how to use numerator and denominator (N,D) of the output transfer function yv. where yv is 16 tranfer functions. i want to see N and D and use them in another process.
for i=1:4
for j=1:4
gvi(i,j)=tf(N(i,:),D(j,:))
yv(i,j)=series(yc,gvi(i,j))
end
end
[N,D]= tfdata(yv)%%%% this line doesn't show the content of N and D

回答 (1 件)

madhan ravi
madhan ravi 2020 年 8 月 6 日
編集済み: madhan ravi 2020 年 8 月 6 日

0 投票

Use it inside the loops, preallocation is recommended for the variables.

4 件のコメント

msh jgtu
msh jgtu 2020 年 8 月 6 日
I tried to use it inside the loop it gives error
madhan ravi
madhan ravi 2020 年 8 月 6 日
ctr = 0;
[gvi, yv, N, D] = deal(cell(4*4, 1));
for ii = 1 : 4
for jj = 1 : 4
ctr = ctr + 1;
gvi{ctr} = tf(N(ii,:),D(jj,:))
yv{ctr} = series(yc, gvi{ctr})
[N{ctr}, D{ctr}]= tfdata(yv)
end
end
celldisp(N)
celldisp(D)
msh jgtu
msh jgtu 2020 年 8 月 6 日
error
Error using tf (line 287)
The values of the "num" and "den" properties must be row vectors or cell arrays of row vectors, where each
vector is nonempty and containing numeric data. Type "help tf.num" or "help tf.den" for more information.
Error in forloop (line 60)
gvi{ctr} = tf(N(ii,:),D(jj,:))
madhan ravi
madhan ravi 2020 年 8 月 6 日
編集済み: madhan ravi 2020 年 8 月 6 日
Without knowing the missing variables , can’t help further.

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

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2020 年 8 月 6 日

編集済み:

2020 年 8 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by