When you make a tall array from a fileDatastore, the resulting tall array is a tall cell array. CELL2UNDERLYING converts that tall cell array to a tall array of the underlying data. For example, if your fileDatastore returns a table for each file that it reads, then a tall array based on that fileDatastore would be a tall cell array where each cell contained a table. Using CELL2UNDERLYING would convert that to a tall table.
MathWorks Parallel Computing Toolbox Team (2021). cell2underlying for tall arrays (https://www.mathworks.com/matlabcentral/fileexchange/61517-cell2underlying-for-tall-arrays), MATLAB Central File Exchange. Retrieved .
Hi Andre, try putting this in an @tall folder somewhere on your path but not under the MATLAB install. The contents of the MATLAB install is cached so new files added under there might not be recognized (and may require admin rights to modify anyway). Also, the list of methods for a class is determined when you first create an object of that class, so you need to get this in the right place and on the path *before* first using a tall array. As an example, I have a folder "matlab" in my home directory that is on my MATLAB path, and adding this function to "/home/<me>/matlab/@tall", then restarting MATLAB, seemed to work fine.
I try to run this script, but it does not work. I get the following message:
>> which cell2underlying
C:\Program Files\MATLAB\R2016b\toolbox\stats\bigdata\@tall\cell2underlying.m % tall method
Undefined function 'cell2underlying' for input arguments of type 'tall'.
Has someone an idea?
Hi, I just got a mac, how can the file be saved in [matlabroot '\toolbox\matlab\bigdata\@tall'] with a mac?
Awesome function! Makes Tall Arrays even better!
This file should be saved in the folder:
>> [matlabroot '\toolbox\matlab\bigdata\@tall']
This should be added to the description for clarification. Otherwise works great!
@Edric, thanks for that, I've dropped it in the bigdata tool box @tall path. Which now allows it to work correctly.
\MATLAB\R2016b\toolbox\stats\bigdata\@tall\cell2underlying.m % tall method
@Ian I suspect you have the CELL2UNDERLYING function itself on the path - you need to have the "@tall" directory on the path. "which cell2underlying" should return something like "path/to/@tall/cell2underlying.m % tall method".
>> tt = tall(readall(FDS));
>> ttt = cell2underlying(tt);
Error using tall/chunkfun
Cannot access method 'chunkfun' in class 'tall'.
Error in cell2underlying (line 44)
out = chunkfun(@(x) iFcn(localSize, x), in);
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!