Is it possible to construct the code below?
이전 댓글 표시
% --- Executes on button press in Calculate.
function Calculate_Callback(~, ~, handles)
% hObject handle to Calculate (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ExPath1 = get(handles.Filename1, 'string');
[x, x_1, x_2, x_3, x_4, x_5] = correctionModelworking1(ExPath1,'True',63,handles);
ExPath2 = get(handles.Filename2, 'string');
[x, x_1, x_2, x_3, x_4, x_5] = correctionModelworking1(ExPath2,'True',63,handles)
ExPath3 = get(handles.Filename3, 'string');
[x, x_1, x_2, x_3, x_4, x_5] = correctionModelworking1(ExPath3,'True',63,handles)
ExPath4 = get(handles.Filename4, 'string');
[x, x_1, x_2, x_3, x_4, x_5] = correctionModelworking1(ExPath4,'True',63,handles)
ExPath5 = get(handles.Filename5, 'string');
[x, x_1, x_2, x_3, x_4, x_5] = correctionModelworking1(ExPath5,'True',63,handles)
ExPath6 = get(handles.Filename6, 'string');
[x, x_1, x_2, x_3, x_4, x_5] = correctionModelworking1(ExPath6,'True',63,handles)
I ask, because when i select various files and press calculate the matlab program does not work. However, when I select one file at a time; the program runs with no problem.
댓글 수: 6
Iain
2013년 6월 6일
What is the error you are getting, or what behaviour are you seeing that you should not be?
Cordelle
2013년 6월 6일
Walter Roberson
2013년 6월 6일
Please read the guide to tags and retag this question; see <http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags?
Walter Roberson
2013년 6월 6일
When you "select various files", do you mean that you are using uigetfile() with multiselect mode for each of the 6 Filename handles you have, and the String property for each is therefore a cell array of strings?
If not, then how do you select one file at a time when your routine appears to need 6? Is it the case that in that situation the other Filename handles will have empty strings and your correctionModelworking1 routine will detect that and silently do nothing?
Iain
2013년 6월 6일
That error tells me that you are supplying an invalid filename.
Cordelle
2013년 6월 6일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!