Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Matrix manipulation coding with If and for loops

1 回表示 (過去 30 日間)
Racky
Racky 2015 年 7 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a n x 2 matrix. I want to basically look at adjacent number in the column one and if the difference in the values is greater than 1, than I want to insert a blank space in the nx2 matrix.
Can anyone please help with this?
  5 件のコメント
Walter Roberson
Walter Roberson 2015 年 7 月 17 日
cell arrays. Separate them out and work with them one by one.
dpb
dpb 2015 年 7 月 17 日
Or use accumarray with the subscript vector obtained from
ix=find(diff([0;x(:,1))>1);
to compute the statistics wanted.

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by