フィルターのクリア

How to obtain a vector of indices using loop

1 回表示 (過去 30 日間)
juan sanchez
juan sanchez 2019 年 9 月 15 日
編集済み: dpb 2019 年 9 月 15 日
Hi, I have a 10,000 row x 16 column x numFiles pages corresponding to time x heights x horizontal distances representing the measurements of mean speed Vmean speed in a 3D cell array.
If I want to get the maximum value index all I have to do is type: Vmax all=[V_max_all,I] = max(abs(V_mean(:))
where I is the linear index location that correspond to Vmax inside the total Vmean array.
Then in order to extract the subscripts for this Vmax inside the array I use:
[I_time, I_station, I_file] = ind2sub(size(V_mean),I)
On the other hand, I also have Venvelope = (Vmax1;Vmax2;Vmax3;...Vmmax16) where Venv is a 16 row x numfile column,
Therefore, I want to obtain a loop from which I can obtain a vector with the indices for each corresponding height
for i=1:16
for j=1:numfiles
[I_time, I_station, I_file] = ind2sub(size(V_mean(time, i,j)),I)
....
so I could obtain the vector [I_time, I_station, I_file] corresponding to each Vmax1;Vmax2,...)

回答 (0 件)

カテゴリ

Help Center および File ExchangeStability Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by