フィルターのクリア

Info

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

How can I get the row of a certain value in excel

2 ビュー (過去 30 日間)
abich
abich 2017 年 6 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have an excel file of two sheets. In each sheet i have 2 columns, the first representing some IDs(corresponding to some tasks) and the second representing minutes, so all the values are of type integer. At first, i search for a redundant task ID in both sheets, then I look for the minutes corresponding to the task in both sheets and then i shall calculate the difference. So Here is the code I used
if true
firsttasks = xlsread('myfile1','Feuil1', 'A1:A3');
secondtasks = xlsread('myfile1', 'Feuil2', 'A1:A3');
Lia = ismember(firsttasks,secondtasks,'rows');
for i=1:3
if Lia(i) == 1
found = firsttasks(i);
%get the minutes for the redundant task 'found', in sheet 1
minute1 = raw(i,i);
end
end
end
At this point, i have extracted the redundant task and the minutes corresponding to it in the first sheet. Now i need to extract the minutes from the second sheet, corresponding to the same task ID.
I am relatively new to Matlab, so im sure there's an even better way to do all this. Thanks in advance for your help.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by