MATLAB Answers

How do I reshape a dataset?

3 views (last 30 days)
andrew
andrew on 14 Feb 2014
Commented: andrew on 14 Feb 2014
I have a 288x35 dataset, how do I make it into 35x288?

Answers (2)

Thomas
Thomas on 14 Feb 2014
Edited: 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

Wayne King
Wayne King on 14 Feb 2014
Edited: 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 Comments
andrew
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?

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by