Error: Unexpected MATLAB expression.
6 次查看(过去 30 天)
显示 更早的评论
Hello. This is my code and I keep getting the error "Unexpected MATLAB Expression", several times throughout but can't find the mistake.
Error in line 'Buka citra asli';
% --- Executes on button press in open.
function open_Callback(hObject, eventdata, handles)
% hObject handle to open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[nama_file1, nama_path1]=uigetfile(...
{'*.bmp; *.jpg',' File Citra(*.bmp, *.jpg)';
'*.bmp','File Bitmap(*.bmp)';...
'*.jpg','File Jpeg(*.jpg)';...
'*.*', 'Semua File(*.*)'}...
'Buka citra asli';
0 个评论
回答(1 个)
Cris LaPierre
2023-3-27
编辑:Cris LaPierre
2023-3-27
You are missing your closing paretheses, as well as a comma to separate the final line from the cell array..
[nama_file1, nama_path1]=uigetfile(...
{'*.bmp; *.jpg',' File Citra(*.bmp, *.jpg)';
'*.bmp','File Bitmap(*.bmp)';...
'*.jpg','File Jpeg(*.jpg)';...
'*.*', 'Semua File(*.*)'},...
'Buka citra asli');
2 个评论
Walter Roberson
2023-3-27
Cris's suggested code works fine on my system.
Notice that Cris made two changes:
- Add a comma after the 'Semua File(*.*)'} and before the ...
- add closing ')' after 'Buka citra asli'
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Function Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!