Hello all,
I have a matrix Engine_data_temp whose 5th column contains values of time (eg: 1;1;1;2;2…600) and 10th column contains values of fuel consumption. I am currently using code shown below to find unique value of time and minimum value of fuel consumed at that time:
(As suggested my one of the community member)
[uniqueT,~,jk]=unique(Engine_data_temp(:,5)); minFc=accumarray(jk,Engine_data_temp(:,10),[],@min);
I also need to find the index at which min values of fuel consumption are being selected at each unique time instances because I need this index to access other columns in matrix Engine_data_temp.
Thank you!
Best Answer