Ältere Kommentare anzeigen
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を使わない形で表現できないかと考えておりますが,
良いアイデアがありません.
ご教示いただけないでしょうか?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!