getting and printing data from matrix
3 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone,
Works: 5 8 9 15 7 12
A1: 1 3 2 3 1 2
A2: 3 2 1 1 2 3
Looking at the matrix structure given above, I want to print jobs with the value 3 in row A1 in another matrix. how can I do it?
Example for A1 ;
new matrix: 8
15
1 件のコメント
Jan
2022 年 3 月 29 日
What is a "matrix structure"? Is this a struct containing the vectors 'Works', 'A1' and 'A2'? Please post some code, which creates the array.
What are "jobs"?
採用された回答
Star Strider
2022 年 3 月 29 日
I am not certain what the original matrix structure is, so I am taking some liberties with it.
Works = [5 8 9 15 7 12];
A1 = [1 3 2 3 1 2];
A2 = [3 2 1 1 2 3];
new_matrix = Works(A1 == 3)
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!