MATLAB Answers

How to turn dataset data in an N-dimensional matrix

2 views (last 30 days)
Dan on 3 Jul 2012
Hi to all,
I am using a dataset object (from the statistics toolbox), with four variables, three of which are nominal and contain the characters of the data, and the fourth is a double containing the actual data.
My question is: how do I turn the data into a 3-D matrix, having one dimension for each variable but the one containing the data? Or more generally, how do I turn an N+1 columns dataset into a corresponding N-dimensional matrix with each dimension of the matrix having length equal to the number of levels of the variable it represents?
Thank you very much all the help you can provide
  1 Comment
Sean de Wolski
Sean de Wolski on 3 Jul 2012
This doesn't sound right. Could you please tell us what you want to do with a 10x4 double array and reshape?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by