how to iterate over a table using a for with arrays
2 次查看(过去 30 天)
显示 更早的评论
I have a table in which I must iterate over two columns, in one it contains numbers and in the other arrays ...
table type zone value 1 lateral 1 lower 1 higher 2 lateral 2 lower 2 extreme
so that if a certain value is met for each type and zone, it can be stored where it was given (alarm) in another column of the same table
0 个评论
回答(1 个)
Ameer Hamza
2018-5-14
You can access column entries similar to an array. For example
table1.var1(1)
will access the first entry in column var1. You can use it in for loop similar to an array.
You can also use arrayfun(), but how to use it will depend on the type of your dataset.
2 个评论
Ameer Hamza
2018-5-14
It is difficult to understand your question like this. If possible, please attach your sample dataset as a mat file containing the table.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!