Extract particular element from cell and create table with titles
1 view (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
madhan ravi
on 23 Mar 2019
T = array2table(cellfun(@(x)x(396),C),'VariableNames',{'A','B','C','D'}) % C is your cell array
0 Comments
More Answers (0)
See Also
Categories
Find more on Electrical Block Libraries in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!