How to find the index of missing values in a cell array without looping through each element?
Show older comments
S1 = struct();
S2 = struct();
C = {S1 S2 missing};
Accepted Answer
More Answers (1)
Bharat Chandra Mukkavalli
on 11 Jul 2022
0 votes
Hi,
You can use the "cellfun()" function to apply a function to all the contents in a cell array. Further documentation on cellfun() can be found here: https://in.mathworks.com/help/matlab/ref/cellfun.html
Refer to link here on finding the indices of non-empty cells in a cell array: https://in.mathworks.com/matlabcentral/answers/42283-index-non-empty-cells-in-cell-array
Hope this helps!
Categories
Find more on Structures in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!