Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
abich
abich il 12 Giu 2017
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by