Extract particular element from cell and create table with titles

1 view (last 30 days)
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

madhan ravi
madhan ravi on 23 Mar 2019
T = array2table(cellfun(@(x)x(396),C),'VariableNames',{'A','B','C','D'}) % C is your cell array

More Answers (0)

Categories

Find more on Electrical Block Libraries in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!