overwrite matrix A with matrix B (which has another size)

2 ビュー (過去 30 日間)
Nicole
Nicole 2014 年 6 月 4 日
回答済み: Henric Rydén 2014 年 6 月 4 日
Hi,
I would like to overwrite matrix_a with an extended matrix_b.
matrix_a has the dimension 19x57 and is full of data.
matrix_b = [zeros(1,57) matrix_a]
matrix_a = matrix_b;
matrix_a has to be updated and I use this matrix in a loop.
The Error: "Size mismatch (size [57 x 19] ~= size [57 x 20])."
Is there any way to overwrite matrix_a with another matrix with different size?
Thanks! Greeting

採用された回答

Henric Rydén
Henric Rydén 2014 年 6 月 4 日
matrix_b = [zeros(1,57) matrix_a];
clear matrix_a
matrix_a = matrix_b;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by