Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error !!!!!!!!!!!!!!!! in GUI

65 views
Skip to first unread message

LAKSHMIPATHY

unread,
Sep 28, 2010, 2:20:04 AM9/28/10
to
??? Error using ==> feval
Undefined function or method 'edit42_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit42_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit41_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit41_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit40_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit40_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit39_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit39_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit38_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit38_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit35_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit35_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit32_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit32_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit27_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit27_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit37_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit37_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit34_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit34_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit31_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit31_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit26_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit26_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit36_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit36_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit33_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit33_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit30_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit30_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit25_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit25_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit23_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit23_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit29_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit29_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit28_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit28_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit24_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit24_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit5_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit5_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit22_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit22_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit4_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit4_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

??? Error using ==> feval
Undefined function or method 'edit21_CreateFcn' for input arguments of type 'double'.

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> BUSSTOP4 at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)busstop4('edit21_CreateFcn',hObject,eventdata,guidata(hObject))


??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

Walter Roberson

unread,
Sep 28, 2010, 2:39:12 AM9/28/10
to
On 28/09/10 1:20 AM, LAKSHMIPATHY wrote:
> ??? Error using ==> feval
> Undefined function or method 'edit42_CreateFcn' for input arguments of
> type 'double'.

Is there a reason you feel that those methods should exist? Have you
searched your source files to find out which file they are defined in?

How did you run your program? If you started it by opening the .fig file
then that will not work: you have to run the .m file associated with the
GUI.

LAKSHMIPATHY

unread,
Oct 3, 2010, 10:43:04 AM10/3/10
to
Hello Sir!
I am running the *.M file to start not the fig file. And these
'edit42_CreateFcn' method is not needed. Actually what i am trying to do is "Using GUI i need to enter the text and numbers and the same is to be transmitted to the microcontroller connected to the serial port.
Thanks for your help!

Jan Simon

unread,
Oct 4, 2010, 6:33:05 AM10/4/10
to
Dear LAKSHMIPATHY,

Your email looks like you are working for TMW: lak...@mathworks.com
Is it true?

You've posted a really large list of error messages, but you did not mention how this error was produced and you did not ask a question.
The error messages claims, that the function "edit42_CreateFcn" cannot be used. You claim, that:


> 'edit42_CreateFcn' method is not needed.

So what's correct now?

I'm deeply impressed, that Walter tries to help you based on these lean information. He got my respect.
I'm at least not able to help you, but your debugger is. A debugger is more helpful to find the cause of problems than a newsgroup is.

Kind regards, Jan

Walter Roberson

unread,
Oct 4, 2010, 10:27:24 AM10/4/10
to
On 04/10/10 5:33 AM, Jan Simon wrote:
> Dear LAKSHMIPATHY,
>
> Your email looks like you are working for TMW: lak...@mathworks.com
> Is it true?

People who use the mathworks forum interface but do not establish an
alternate email address are shown as having @mathworks.com email addresses.


> You've posted a really large list of error messages, but you did not
> mention how this error was produced and you did not ask a question.
> The error messages claims, that the function "edit42_CreateFcn" cannot
> be used. You claim, that:
>> 'edit42_CreateFcn' method is not needed.
> So what's correct now?

I suspect this is a case of starting with a GUIDE generate GUI that
someone else created and trying to adapt it for something else without
even having full source of what was done previously.

Probably the easiest solution for the original poster would be to start
over *without* the old GUI: that way the poster would know what
everything was for and would have the source.

I'm not sure what the original poster needs beyond,

function mygui
editbox = uicontrol('Style','edit', 'Units', 'pixels', ...
'Position', [20 20 400 400], 'Callback', @send_the_data);
end

function send_the_data(src, event)
current_text = char(get(editbox, 'String'));
if isempty(current_text)
return
end
s = serial('COM3:'); %and maybe set baud rate too
fopen(s);
fprintf(s, '%s\n', current_text); %or perhaps transpose(current_text)
fclose(s);
end

LAKSHMIPATHY

unread,
Oct 4, 2010, 12:48:04 PM10/4/10
to
I don't wat is TMW. Actually i am M.tech guy. I doing this for my project.

Sir when i am running your code It is showing some error like

??? Undefined function or variable 'editbox'.

Error in ==> mygui>send_the_data at 6


current_text = char(get(editbox, 'String'));

??? Error while evaluating uicontrol Callback

In my code also i am getting the same error. In my gui i have around 30 test feilds all these data should be transmitted serailly. And how to save this gui has a figure with the text in the fields so that anyone can refer in future

Thank you sir

Walter Roberson

unread,
Oct 4, 2010, 2:03:24 PM10/4/10
to
On 10-10-04 11:48 AM, LAKSHMIPATHY wrote:
> I don't wat is TMW. Actually i am M.tech guy. I doing this for my project.
> Sir when i am running your code It is showing some error like
>
> ??? Undefined function or variable 'editbox'.
>
> Error in ==> mygui>send_the_data at 6
> current_text = char(get(editbox, 'String'));
>

Sorry, that editbox should have been src

current_text = char(get(src, 'String'));

> In my code also i am getting the same error. In my gui i have around 30
> test feilds all these data should be transmitted serailly. And how to
> save this gui has a figure with the text in the fields so that anyone
> can refer in future

If you have not managed to track down those missing edit* functions, then you
should rebuild your GUI instead of trying to modify something you don't have a
clue about.

LAKSHMIPATHY

unread,
Oct 6, 2010, 1:44:23 PM10/6/10
to
Hello Sir!
I was connected the device to COM1 port and i am try to transmit the text from the GUI textbox and displaying the same in the LCD display in the device. I am not able to display the full text only first three characters are getting displayed. But if i try to display from terminal to device it is working its displaying complete text. I don't know wat is the wrong.

LAKSHMIPATHY

unread,
Nov 27, 2010, 10:41:03 PM11/27/10
to
"LAKSHMIPATHY " <lak...@mathworks.com> wrote in message <i8ichn$h25$1...@fred.mathworks.com>...

> Hello Sir!
> I was connected the device to COM1 port and i am try to transmit the text from the GUI textbox and displaying the same in the LCD display in the device. I am not able to display the full text only first three characters are getting displayed. But if i try to display from terminal to device it is working its displaying complete text. I don't know wat is the wrong.

Hello sir!

I got the exact wat i am expecting. Thank you very much. Serial transmission is working properly. Once again thankyou very much

Erick Rivera

unread,
Sep 7, 2015, 2:02:13 PM9/7/15
to
Hi,

for me all this kind of errors occurred when I copied myGUI1.m and myGUI1.fig to say myGUI2.m and myGUI2.fig manually (either at command line or file explorer). Although almost everything works fine, it is not good practice to startup a program with errors of any kind.

The correct procedure to make a copy of your original GUI (.fig file) is by the "Save As.." menu GUIDE. This creates the .m file appropiately and regardless of your code, this will not generate any errors.

If you actually copied manually the files, all changes must be manually on GUIDE, element by element (every button, slider, checkbox and so on). Right-click the element select 'View Callbacks' and select (primarily) 'Callback', so it will ask you about the referenced function. Just select yes and change will be made automatically.

The hard-way is to edit properties with inspector properties by double-click the element, and then modify 'Callback' and 'CreateFcn' fields (and any other field where you have code written by you). Here, you noticed that this fields are pointing to myGUI1's functions.

Finally, you must edit the .m file and change every 'myGUI1' with myGUI2' and that's it.

Hope this will be helpful.
0 new messages