Info

This question is closed. Reopen it to edit or answer.

how to handle unknown size of arrey

1 view (last 30 days)
Chaudhary P Patel
Chaudhary P Patel on 2 Feb 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
Actually i am going to use structural data that is very large and i have to use it one by one and i do not know what is its size. so please help me how can i handle it.
  3 Comments
Rik
Rik on 3 Feb 2020
Have a read here and here. It will greatly improve your chances of getting an answer.

Answers (1)

Star Strider
Star Strider on 2 Feb 2020
Use the size function to get the dimensions. There are other functions in and at the end of the size documentation that can provide you with similar results.
To use the results, assuming ‘A’ is your array, to index the the rows:
r_idx = 1:size(A,1);
and the columns:
c_idx = 1:size(A,2);
and other dimensions as necessary.
  21 Comments
Walter Roberson
Walter Roberson on 3 Feb 2020
Do not use importdata. Use readtable

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!