Extract particular element from cell and create table with titles

After my NARX prediction, I get 4 cells of 1x396. Since its a predictive model, only the last element (the 396th element) is relevant to me. So is there any way I can create a 4x1 table extracting only the 396th element of all 4 cells? And have titles to each of the columns in the new table.
Thanks

 Accepted Answer

T = array2table(cellfun(@(x)x(396),C),'VariableNames',{'A','B','C','D'}) % C is your cell array

More Answers (0)

Categories

Find more on Text Analytics Toolbox in Help Center and File Exchange

Products

Release

R2018b

Asked:

on 23 Mar 2019

Answered:

on 23 Mar 2019

Community Treasure Hunt

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

Start Hunting!