forループを使わない方法
Show older comments
n = 1;
d = 2;
Phi = eye(n+d+1);
Phi_b = [1;2];
for k = 1:d
Phi(k+1:k+n+1,k) = Phi_b;
end
上記のような単位行列Phiの特定の位置にPhi_bを入れるようなプログラムがあります.
処理の都合上をforを使わない形で表現できないかと考えておりますが,
良いアイデアがありません.
ご教示いただけないでしょうか?
Accepted Answer
More Answers (0)
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!