You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should RF_Ident.STASD_Box_FullRF_Num_pixels be empty of zero if no significant pixel was found? In line 699 it is defined that this variable should be 0 if no significan pixel was found.
if Sig_Pix_Indicator_STASD == 0
if p.RF_Type(1) == 1 % Box
RF_Ident.STASD_Box_FullRF_Num_pixels = 0;
end
if p.RF_Type(2) == 1 % All Significant Pixels
RF_Ident.STASD_ASP_FullRF_Num_pixels = 0;
end
if p.RF_Type(3) == 1 % Gaussian
RF_Ident.STASD_Gaus_FullRF_Num_pixels = 0;
end
But than in line 1549 it is checked if the variable is empty if ~isempty(RF_Ident.STASD_Box_FullRF_Num_pixels)...
Since RF_Ident.STASD_Box_FullRF_Num_pixels is 0 at this point it will pass the test in the if statement will run. However, in line 1563 the code tries to index into variables that are empty RF_Ident.STASD_Box_FullRF_STA_time{i} = squeeze(STA(RF_Ident.STASD_Box_RF_coords_centre{maxSTASD_Box_index}(1),RF_Ident.STASD_Box_RF_coords_centre{maxSTASD_Box_index}(2),:,i));
I suggest either setting the variable to empty or testing against if the variable is 0 in the if statement.
The text was updated successfully, but these errors were encountered:
Should RF_Ident.STASD_Box_FullRF_Num_pixels be empty of zero if no significant pixel was found? In line 699 it is defined that this variable should be 0 if no significan pixel was found.
But than in line 1549 it is checked if the variable is empty
if ~isempty(RF_Ident.STASD_Box_FullRF_Num_pixels)...
Since RF_Ident.STASD_Box_FullRF_Num_pixels is 0 at this point it will pass the test in the if statement will run. However, in line 1563 the code tries to index into variables that are empty
RF_Ident.STASD_Box_FullRF_STA_time{i} = squeeze(STA(RF_Ident.STASD_Box_RF_coords_centre{maxSTASD_Box_index}(1),RF_Ident.STASD_Box_RF_coords_centre{maxSTASD_Box_index}(2),:,i));
I suggest either setting the variable to empty or testing against if the variable is 0 in the if statement.
The text was updated successfully, but these errors were encountered: