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

조회 수: 1 (최근 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 CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by