行列 一定範囲ごとに最小値を探す
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
1.2列目にはXY座標が,3列目には-180°から180°までの角度順の角度データが,4列目にはそれに対応した半径の値が格納された行列を作成しました.
A = [245 135 -180 200;245 164 -179.5 170; ~ ;246 170 180 120]
今回データ点数を絞る必要があり,元の行列から,例えば3列目の角度データを基準に,5°ずつの範囲内で最小の半径の行だけを抜き出した行列を作成したい場合に,どのような方法が最適なのでしょうか?
ご教示いただけますよう、よろしくお願いいたします。
1 commentaire
源樹 上林
le 15 Déc 2020
例えば、-180~-175 °だとこう?
a = and( -180 <= A(:,3), A(:,3) < -175 );
[m, i] = min(A(a,4))
A(i, :)
あんまりすっきりしませんね。これだとループ回すことになりそうだし。
というかこういう解釈で合っていますか?
Réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!