I have four 1x50 matrices and I want to save them to one 4x50 matrix. How can I do this?

조회 수: 2 (최근 30일)
I have four 1x50 matrices and I want to save them to one 4x50 matrix. How can I do this?
  댓글 수: 2
Cedric
Cedric 2013년 2월 5일
편집: Cedric 2013년 2월 5일
You deleted the content of all the 4 questions that you asked, after people spent time and energy answering/commenting them, why?
Jan
Jan 2013년 2월 5일
@Teemu: I strongly suggest, that you ask the admins to restore your question. Otherwise there is the chance, that the contributors will ignore your questions in the future, because they could assume, that you are not serious. You find the address at the bottom of this page or you can ask randy Souza. Thanks.

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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 5일
편집: Azzi Abdelmalek 2013년 2월 5일
for k=1:50
title{k}=sprintf('title%d',k)
end
a=rand(1,50);
b=rand(1,50);
c=rand(1,50);
d=rand(1,50);
M=[title;num2cell(a);num2cell(b);num2cell(c);num2cell(d)]
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 5일
편집: Azzi Abdelmalek 2013년 2월 5일
Try again, but before, type: clear
clear
for k=1:50
titre{k}=sprintf('title%d',k)
end
a=rand(1,50);
b=rand(1,50);
c=rand(1,50);
d=rand(1,50);
M=[titre;num2cell(a);num2cell(b);num2cell(c);num2cell(d)]
I've also changed the variable title which is reserved to ploting functions

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

추가 답변 (2개)

Youssef  Khmou
Youssef Khmou 2013년 2월 5일
Suppose your matrices are A,B,C,D all with size 1x50 :
M=zeros(4,50);
M(1,:)=A;
M(2,:)=B;
M(3,:)=C;
M(4,:)=D;

Ryan Livingston
Ryan Livingston 2013년 2월 5일
A = rand(1,50);
B = rand(1,50);
C = rand(1,50);
D = rand(1,50);
E = [A;B;C;D];
  댓글 수: 1
Teemu
Teemu 2013년 2월 5일
Thanks. How I can add one "tittle" line to 4x50 matrix so it will be 5x50 matrix? The line should be added to first line of the matrix.

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

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by