4 ms·
I just wanted to interject here that this limitation is no longer true in Matlab. Take a look at dataset[1] and grpstats[2] in the Statistics Toolbox. They make
by drunkpotato 13y ago
I just wanted to interject here that this limitation is no longer true in Matlab. Take a look at dataset[1] and grpstats[2] in the Statistics Toolbox. They make data frame-style computations much nicer. I was banging my head against Matlab control structures until I found those.
means_by_zip = grpstats(ds, {'zipcode'})
[1] http://www.mathworks.com/help/stats/dataset.html http://www.mathworks.com/help/stats/dataset.html
[2] http://www.mathworks.com/help/stats/grpstats.html http://www.mathworks.com/help/stats/grpstats.html
- sveme 13y agoFYI, they finally included a dataframe like data type in base MATLAB as well and called it `table`: http://blogs.mathworks.com/loren/2013/09/10/introduction-to-the-new-matlab-data-types-in-r2013b/ http://blogs.mathworks.com/loren/2013/09/10/introduction-to-... So you don't need a stats license for that anymore. The question is how many functions will accept this datatype, which is one of the key problems with some of the more advanced datatypes (timeseries has similar issues).
- drunkpotato 13y agoOh, very nice! It's been about a year since I've worked in Matlab on a daily basis, so it's good to see they brought that into base. I didn't have much trouble with datasets because it's fairly painless to convert to a matrix with double(ds) if you setup your text columns as ordinals and nominals rather than cell arrays.