How to code this command in gui?
이전 댓글 표시
I have a function I am working on, "SetImage"
[ret] = SetImage(hbin, vbin, hstart, hend, vstart, vend)
I am making a gui that lets you enter each of these parameters into text boxes, once the "set image" button is clicked it will read the data I have typed into the text boxes and use them for each parameter in this function...
I am unaware of how I can set each box to correspond to each individual parameter, this is my attempt to do so:
% --- Executes on button press in setimagebutton.
function setimagebutton_Callback(hObject, eventdata, handles)
% hObject handle to setimagebutton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
setimgp1=('handles.setimgh'),('String')
setimgp2=('handles.setimgv'),('String')
setimgp3=('handles.setimgstartc'),('String')
setimgp4=('handles.setimgendc'),('String')
setimgp5=('handles.setimgstartrow'),('String')
setimgp6=('handles.setimgendrow'),('String')
[ret]=SetImage(setimgp1,setimgp2,setimgp3,setimgp4,setimgp5,setimgp6);

The handles are the tags of each of my edit boxes, when I try to run it I receive the error message:
Error using atmcdmex SetImage- parameter 6 is not a number
Error in SetImage (line 25) [ret] = atmcdmex('SetImage', hbin, vbin, hstart, hend, vstart, vend);
Error in CamTestGUI>setimagebutton_Callback (line 1866) [ret]=SetImage(setimgp1,setimgp2,setimgp3,setimgp4,setimgp5,setimgp6);
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in CamTestGUI (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)CamTestGUI('setimagebutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Texas Instruments C2000 Processors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

