行列から条件を指定して値を取り出す
Mostrar comentarios más antiguos
以下のような行列Aの2行目の要素が0から1に変わった直後の1行目の値を抽出して別の行列として定義したいのですがうまく表現できません.。
次のような行列Aがあるとします.
A=
1 2 3 4 5 6 7
0 1 1 0 1 1 0
このとき,2行目の要素が2行目の要素が0から1に変わった直後の1行目の値を抜き出し,以下のような行列Bとしたいです.
B=
2 5
どのようにすればよいか教えていただけると幸いです。
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!