i have 1d array of 16 elements. i need to find index of minimum element of first 2 elements, then index of minimum element of next 2 elements and so on. i used the following coding. but it did not work. please send me the suitable coding.thank u.

1 次查看(过去 30 天)
if ersum(:,k)<ersum(:,k+1) miner(:,count)=find(ersum(:,k)); %minind=find(miner); else miner(:,count)=find(ersum(:,k+1)); end k=k+2;

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by