Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How can I get the row of a certain value in excel
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!