Adding up columns of a cell
4 views (last 30 days)
Show older comments
I have a 10x60 cell (let’s call it A). I want to make a new cell (B) from this old one where I add certain values of the columns together so that I get a new 10x40 cell (this new cell will be smaller because 20 columns will be added up together). I have another cell 10x20 (C), that has the index of all the columns in A that need to be added together. How can I do this efficiently?
(note, the class of the things in the cells are "char")
3 Comments
Jan
on 7 Mar 2021
Does "adding" mean a concatenation, if the contents of the cell elements are char vectors?
Sai Veeramachaneni
on 9 Mar 2021
When 20 columns are added together, new cell array will be of 10x41 instead of 10x40. Can you provide with an example of what you are trying to do?
Answers (0)
See Also
Categories
Find more on Logical 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!