该矩阵中,第一列代表数据年月日(2022.2整月),第二列代表小时(24),现希望通过先后判断第一列、第二列的值,将符合时间的该行第三列提取出来。(如,若时间为 2022.02.01日,15时,提取出该时间段的第三列值)
其中data为你的数据
value=[];
for i=l:length(data)
if data(i,1)==20220201 && data(i,2)==1500
value=[value,data(i,3)];
end
end
你得数据是excel数据吗?
x(find(x(find(x(:,1)==20220201),2) == 1500),3)
x(x(:,1)==20220201&x(:,2)==1500,3)