I want to safe a vector in one single matrix spot

Hello,
I am running some loops, and every loop I want to safe the data in a matrix. But every loop I have to safe a vector, so I'd like to put that vector on 1 spot in the matrix. for example: I'd like to put the vector (1, 2, 3, 4, 5) in matrix point matrix(1,4). Can anybody help me?
Nick De Vocht engineering student @ KULeuven

답변 (1개)

Wayne King
Wayne King 2013년 12월 2일
편집: Wayne King 2013년 12월 2일
You cannot put a vector in the location of a single element in a matrix. You can create a cell array and put a vector in an element of the cell array.
X = cell(2,2);
X{1,1} = 1:5;
X{1,2} = 1:2:10; % same as X{3}

댓글 수: 1

Nick
Nick 2013년 12월 2일
Ok I safed the data in a single 1x1 cell array.
How do I safe this cell in a single matrix spot?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

질문:

2013년 12월 2일

댓글:

2013년 12월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by