How do I reshape a dataset?

조회 수: 1 (최근 30일)
andrew
andrew 2014년 2월 14일
댓글: andrew 2014년 2월 14일
I have a 288x35 dataset, how do I make it into 35x288?

답변 (2개)

Thomas
Thomas 2014년 2월 14일
편집: Thomas 2014년 2월 14일
a= rand (2,4)
size(a)
b=a'
size(b)
Is this what you are looking for ?
or
b= reshape(a,4,[]);
in your case
reshape(a,35,[])
if a is 288x35

Wayne King
Wayne King 2014년 2월 14일
편집: Wayne King 2014년 2월 14일
When you say dataset, do you just mean a matrix?
X = randn(288,35);
Y = X.';
If the elements are all real-valued, just
Y = X';
or do you mean the transpose of a MATLAB dataset?
  댓글 수: 3
Wayne King
Wayne King 2014년 2월 14일
If you are talking about numerical data of size 288x35, then assume the data are called data
data = data';
andrew
andrew 2014년 2월 14일
I tried that it says there are too many output argument errors, I assume this is an issue because there are some strings mixed with some numbers?

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

카테고리

Help CenterFile Exchange에서 White에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by