How to code this command in gui?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Texas Instruments C2000 Processors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
