MATLAB Answers

0

How do I reshape a dataset?

andrew 님이 질문을 제출함. 14 Feb 2014
최근 활동 andrew 님이 댓글을 추가함. 14 Feb 2014
I have a 288x35 dataset, how do I make it into 35x288?

  댓글 수: 0

로그인 to comment.

태그

답변 수: 2

Answer by Thomas
on 14 Feb 2014
Edited by Thomas
on 14 Feb 2014

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

  댓글 수: 0

로그인 to comment.


Answer by Wayne King
on 14 Feb 2014
Edited by Wayne King
on 14 Feb 2014

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

andrew
on 14 Feb 2014
by dataset I mean an uploaded xcel spread sheet
Wayne King
on 14 Feb 2014
If you are talking about numerical data of size 288x35, then assume the data are called data
data = data';
andrew
on 14 Feb 2014
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?

로그인 to comment.



Translated by