フィルターのクリア

find value and print

1 回表示 (過去 30 日間)
Esra Demirbilek
Esra Demirbilek 2022 年 4 月 3 日
コメント済み: Esra Demirbilek 2022 年 4 月 4 日
Hello everyone,
This is my code:
(this code shows which machine the 1st job is assigned to.)
birfazson = makineatama(:,1:2:end)
resultt = birfazson(1,birfazson(2,:) == 1).'
Workspace;
birfazson:
30 36 4 16 5 22 17 23 66 26 15 27 (Works)
7 8 8 4 10 2 3 1 7 1 8 3 (machine)
resultt:
23
26
For example, I can see which machine is doing which job. 1. Resultt matrix, which works are done for the machine.
I can print.
1, 2, 3, 4,...10 in the Resultt matrix I want to print which jobs the machines enter one by one. how can I do it.
(Example)
resultt: (I want to do like this)
(For 1) (For2) (For 3)
23 22 17
26 27

回答 (1 件)

David Hill
David Hill 2022 年 4 月 3 日
a =[30 36 4 16 5 22 17 23 66 26 15 27
7 8 8 4 10 2 3 1 7 1 8 3];
for k=1:3
b{k}=a(1,a(2,:)==k);
end
  1 件のコメント
Esra Demirbilek
Esra Demirbilek 2022 年 4 月 4 日
Thank you for your help, but I want to print the k values ​​into the result matrix.
As I tried to explain in the example

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Parallel Server についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by