UIgetfile Error on Matlab Online

When I run this line, I'm receiving this error. Not too sure how to interpret it. Thanks in advance for the help! I'm using Matlab Online.
[f_name p_name] = uigetfile('*.mat','Select the input data file(s)','MultiSelect', 'on');
Index exceeds the number of array elements (0).
Error in matlab.ui.internal.dialog.FileChooser/updateFromDialog (line 215)
obj.PathName = filepaths{1};
Error in matlab.ui.internal.dialog.FileChooser/prepareDialog/localupdate (line 95)
updateFromDialog(obj,updateDataObject(obj));

댓글 수: 2

Geoff Hayes
Geoff Hayes 2020년 3월 16일
Michael - at what point do you see this error? After you have chosen a file? Have you chosen more than one file? It sounds like filepaths is empty so please describe what you have selected.
Michael Chang
Michael Chang 2020년 3월 16일
I get this error after I've chosen a file (same result for one or multiple files).

댓글을 달려면 로그인하십시오.

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 3월 16일
편집: Cris LaPierre 2020년 3월 16일

0 개 추천

It appears the 'Multiselect' flag is what is causing the error. Remove that, and it should work.
[f_name p_name] = uigetfile('*.mat','Select the input data file(s)');

댓글 수: 2

Ahmad Gad
Ahmad Gad 2021년 8월 16일
What if I still need to select multiple files?
Cris LaPierre
Cris LaPierre 2021년 8월 17일
If you are using MATLAB Online, you would need to use multiple calls to uigetfile. Multiselect is not currently supported in MATLAB Online.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

제품

태그

질문:

2020년 3월 16일

댓글:

2021년 8월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by