how to find out the cell array size in for loop with conditions?
1 次查看(过去 30 天)
显示 更早的评论
I had a cell array size 60*48 and each cell having one value( 1 or less than ), then In a for loop of 1:48 , I want to know in each step the length of cell array or nukber of rows when cell array values is equal to 1.
2 个评论
Arthur Roué
2020-8-12
I'm not sure to understand. Can you share some code ? Do you want to know the size of each element in your cell array rows ? What is equal to 1 ?
采纳的回答
KSSV
2020-8-13
Your mat file has a cell SoC2W. This is of size 60*48. Each element is a cell. You can convert it to matrix using:
M = cell2mat(SoC2W) ;
You matrix will be of size 60*48. So each column has 60 elements.
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!