Accessing nested array data
조회 수: 1 (최근 30일)
이전 댓글 표시
I would like to use a loop to find out which rows have 1's in a nested array. I will include a screenshot of what my data looks like and explain further:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155652/image.jpeg)
I need to find out which row in 'surge15feet' has 1's as well as the row in the main variable 'counties.' I also would like to start the index in the last row of the surge variable and stop the loop and record the row when it encounters a 1.
The output I would like is 1x61 matrix (because of 61 counties) with a value between 7 and 0 corresponding to the first row in surge15feet that has a 1.
Thanks for the help! Kenny
댓글 수: 2
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!