How to store the result of each iteration of a forloop into an array MATLAB
1 回表示 (過去 30 日間)
古いコメントを表示
CHANDRA SHEKHAR BESTA
2014 年 2 月 14 日
コメント済み: CHANDRA SHEKHAR BESTA
2014 年 2 月 14 日
How to store the result of each iteration of a forloop into an array MATLAB. I am imported data(i.e., K, L, T)matrix from simulink to workspace. I want to calculate the transfer functions in MATRIX form.
This program calculating Transfer functions.
But, when i am using this "v".
I am getting last element of the matrix.
Can you please help me, How to store all matrix elements in MATLAB.
clc
K;
L;
T;
one;
for i=1:4
for j=1:4
v=tf([K(i*j)],[T(i*j) one(i*j)], [L(i*j)])
end
end
0 件のコメント
採用された回答
Mischa Kim
2014 年 2 月 14 日
編集済み: Mischa Kim
2014 年 2 月 14 日
Chandra, use
v{i,j} = tf([K(i*j)],[T(i*j) one(i*j)], [L(i*j)])
8 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!