개발자 뺚
[Cody] Problem 2166. Concatenate a successive power matrix in a column matrix 본문
Solution/MATLAB
[Cody] Problem 2166. Concatenate a successive power matrix in a column matrix
뺚 2023. 11. 21. 15:00Generate F = [M1 M^2 ... M^p] with M a matrix, without using for.
function F = powerConcat(M,p)
F = M;
for i = 2:p
F = cat(2, F, M^i);
end
end
'Solution > MATLAB' 카테고리의 다른 글
[Cody] Problem 2017. Side of an equilateral triangle (0) | 2023.11.19 |
---|---|
[Cody] Problem 55220. Matrix Quadrants (0) | 2023.11.18 |
[Cody] Problem 790. Cody Computer Part 5 - Guess the Name of Cody Computer (0) | 2023.10.13 |
[Cody] Problem 44946. Solve a System of Linear Equations (0) | 2023.08.23 |
[Cody]Problem 44947. Find the Oldest Person in a Room (0) | 2023.08.23 |