Error with Plotting Tall table Column Data "Tall inputs must be real column vectors."

2 ビュー (過去 30 日間)
Christopher Greulich
Christopher Greulich 2019 年 6 月 7 日
I'm trying to plot data stored in a tall array accross several columns.
% Expected Behavior
t = table(1:1000);
figure;
plot(t.Var1(1,:)); % Works as expected
% Converting to tall table yields error
tallt = tall(t);
plot(tallt.Var1(1,:));
% Error using matlab.graphics.chart.primitive.tall.Line/doPlot
% Tall inputs must be real column vectors.
%
% Error in matlab.graphics.chart.primitive.tall.Line
%
% Error in tall/plot (line 84)
% htemp = matlab.graphics.chart.primitive.tall.Line('YData', y, ...
% Work around
plot(gather(tallt.Var1(1,:)));
Is there a fix that doesn't involve reading the tall array into memory?
  3 件のコメント
Christopher Greulich
Christopher Greulich 2019 年 6 月 13 日
I've just discovered the tall datastructure so I'm still new to the limitations and design intentions. I've think I've mostly found what I was looking for.
I've written alot of analysis and visiluation scripts before moving to the tall array structure and was hoping to not have to change them but it looks like I have a little recoding to do.
I've got a tall timetable from a radiation sensor. 1 second resolution in the tall direction (several months of data) by 1k+ channels in the nontall direction. I want to plot an imagesc of the 2d matrix with time one dimension and the channels on the other.
I can retime and gather, than plot the matrix.
size(tallTable.spectra)
% 1x2 tall double row vector
% [19845631 1000]
retimedSpectra = gather(retime(tallTable,'hourly','sum'));
imagesc(retimedSpectra.spectra);
The problem I was trying to solve was that the gathering operation can take several hours and the imagesc wouldn't show anything until it was finished. So I have to drop the tall array and use the datastore directly for updates.
reset(ds)
while hasdata(ds)
T = read(ds);
%% PLOT/imagesc and drawnow %%
end
The issue I'm currently trying to work around is retime for a arbitarty time increment for tall arrays apparently doesn't support the retime(TT1,'regular',method,'TimeStep',dt) option.
retime(retimedSpectra,'regular','sum','TimeStep',minutes(360)) % works for timetable
retime(tallTable,'regular','sum','TimeStep',minutes(360)) % doesn't works for tall timetable
I can probably calculate a 'NEWTIMES' vector with regular time and feed it directly to synchronize but I haven't got around to it.
numSamples = %f(tallTable.time([1 - end]), timestep);
NEWTIMES = linspace(tallTable.time(1), tallTable.time(end), numSamples);
Christopher Greulich
Christopher Greulich 2019 年 6 月 13 日
Another general question. Is there a good way to estimate how much memory a gather operation may use and the available system resources? I'm trying to figure out how small of a time step I could use in the retime operation before it errors out of memory.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeTall Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by