MATLAB Answers

request advice on groupfilter in timetables

1 view (last 30 days)
cris
cris on 29 Jul 2021
Commented: cris on 2 Aug 2021
Would greatly appreciate some advice on what should be a simple operation with groupfilter. The script under construction below needs to filter for (isolate) all the rows & columns pertaining to one ticker at a time.
load SPMIDFund.mat;
Fbatch = {'GGG','WSM','CGNX','CRL','FICO','MOH'};
for corpind = 1:length(Fbatch);
corp = Fbatch{corpind};
%groupfilter(SPMIDFund,
date = SPMIDFund.CALENDARDATE;
repdate = SPMIDFund.LASTUPDATED;
sls = SPMIDFund.REVENUE;
ps = SPMIDFund.PS
% etc.
% etc.
% assignin
% save
end
The data source is a 191x91 timetable already binned by ticker (fragment attached)--I need to also filter for that same ticker. 'TICKER' is the only column denoting the company associated with the earnings data in the rest of the table. Have not been able to find a groupfilter or rowfun syntax that works. Suggestions will be appreciated.
CC
  8 Comments
cris
cris on 2 Aug 2021
Will try your solution tomorrow (Mon). Unfortunately, it will be necessary to split these tables in due course in order to use in a different script.

Sign in to comment.

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!