Hi, I have a 5269x7x1526 matrix/tensor and I need to extract data based on criteria from column 5 of the middle index. When extracting this data I need to keep the data entries from columns 5 and 2 together because I will need to plot them. For example, column 2 of the middle dimension of my matrix/tensor is temperature data and column 5 is location data. So far this is what I have:
for i = 1:num_time_steps range = T_all((T_all(:,5,i)>=0.02) & (T_all(:,5,i)<=0.03),:);end
Here I am trying to extract data associated with column 5 that is between 0.02 and 0.03 but when I run this loop I get a bunch of zeros out except for the last 10 or so columns which do not give me meaningful information.
Does anybody have any ideas of how I can extract paired data that lies between 0.02 and 0.03 of the 5th column of my multidimensional matrix/tensor? I need to keep the location and the temp data together, columns 5 and 2.
Best Answer