@@ -185,27 +185,27 @@ function class_path_CreateFcn(hObject, eventdata, handles)
185185%% CODE FOR ALL THE PATH TEXTS %%
186186function b_path_data_Callback(hObject , eventdata , handles )
187187 FN_data = uigetdir(matlabroot ,' Select data folder' );
188- if FN_data == 0
189- return
190- end
191- set(handles .path_data ,' String' ,FN_data );
188+ if isnumeric( FN_data )
189+ return
190+ end
191+ set(handles .path_data ,' String' ,FN_data );
192192function b_path_output_Callback(hObject , eventdata , handles )
193193 FN_output = uigetdir(matlabroot ,' Select output folder' );
194- if FN_output == 0
195- return
196- end
197- set(handles .path_output ,' String' ,FN_output );
194+ if isnumeric( FN_output )
195+ return
196+ end
197+ set(handles .path_output ,' String' ,FN_output );
198198function b_path_labels_Callback(hObject , eventdata , handles )
199199 [FN_labels ,PN_labels ] = uigetfile({' *.csv' ,' CSV-file (*.csv)' },' Select CSV file containing segment labels' );
200- if FN_labels == 0 && PN_labels == 0
201- return
202- end
200+ if isnumeric( FN_labels ) && isnumeric( PN_labels )
201+ return
202+ end
203203 set(handles .path_labels ,' String' ,strcat(PN_labels ,FN_labels ));
204204function segment_path_Callback(hObject , eventdata , handles )
205205 [FN_seg ,PN_seg ] = uigetfile({' *.mat' ,' MAT-file (*.mat)' },' Select MAT file containing segmentation data' );
206- if FN_seg == 0 && PN_seg == 0
207- return
208- end
206+ if isnumeric( FN_seg ) && isnumeric( PN_seg )
207+ return
208+ end
209209 error = check_object_output_dir(1 , FN_seg , PN_seg );
210210 if error == 1
211211 errordlg(' File path for segmentation configurations not found.' ,' Input Error' );
@@ -214,12 +214,12 @@ function segment_path_Callback(hObject, eventdata, handles)
214214 errordlg(' Wrong MAT file was selected.' ,' Input Error' );
215215 return
216216 end
217- set(handles .seg_path ,' String' ,strcat(PN_seg ,FN_seg ));
217+ set(handles .seg_path ,' String' ,strcat(PN_seg ,FN_seg ));
218218function b_class_path_Callback(hObject , eventdata , handles )
219219 [FN_class ,PN_class ] = uigetfile({' *.mat' ,' MAT-file (*.mat)' },' Select MAT file containing classification data' );
220- if FN_class == 0 && PN_class == 0
220+ if isnumeric( FN_class ) && isnumeric( PN_class )
221221 return
222- end
222+ end
223223 error = check_object_output_dir(2 , FN_class );
224224 if error == 1
225225 errordlg(' File path for classification configurations not found.' ,' Input Error' );
@@ -229,7 +229,7 @@ function b_class_path_Callback(hObject, eventdata, handles)
229229 return
230230 end
231231 set(handles .class_path ,' String' ,strcat(PN_class ,FN_class ))
232-
232+
233233% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
234234%% CODE FOR BUTTONS %%
235235function load_traj_buttom_Callback(hObject , eventdata , handles )
0 commit comments