Hi, In my gui I am using [nazov,cesta] =uigetfile({'*.edf';'*.txt'},'File Selector'); to load file .edf and .txt It works good, but I need to use switch or if, I want one action for file .edf and other action for .txt file. I wrote if nazov=={'*.edf'} disp('edf') else disp('other') end but there is a error Undefined operator '==' for input arguments of type 'cell'.
Error in eeg_spracovanie>menu_signal_disk_Callback (line 560) if nazov=={'*.edf'} thanks for any help

 채택된 답변

KSSV
KSSV 2017년 12월 26일
편집: KSSV 2017년 12월 26일

0 개 추천

Use:
[nazov,cesta] =uigetfile({'*.edf';'*.txt'},'File Selector');
[pathstr,name,ext] = fileparts(nazov)
if strcmp(ext,'.edf') ;
elseif strcmp(ext,'.txt')
end
Read about strcmp.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

질문:

2017년 12월 26일

편집:

2017년 12월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by