Hello
I have compiled a GUI to an exe. file to run it on a computer without matlab installed. To run the exe. file on a computer without matlab installed I have to install the Matlab Compiler Runtime (MCR). Does it matter where I install the MCR?
Best Regards
Robin
|
|
0
|
|
|
|
Reply
|
Robin
|
9/7/2010 2:29:06 PM |
|
I don't believe where you install it is an option presented to you.
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
9/7/2010 6:56:12 PM
|
|
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <fce513f4-3696-44d3-86b7-c6ba33a9dc5b@11g2000yqq.googlegroups.com>...
> I don't believe where you install it is an option presented to you.
Thanks Imageanalyst
I just have a problem with my GUI, I run on a computer with only MCR installed. The GUI works until I push a button that runs a function which imports data from an access database. It says "Error while evaluating uicontrol callback". I am quit sure the MCR support the database toolbox?
Best Regards
Robin
|
|
0
|
|
|
|
Reply
|
Robin
|
9/8/2010 3:32:06 PM
|
|
"Robin " <robinh887@hotmail.com> wrote in message <i68a9m$3nt$1@fred.mathworks.com>...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message <fce513f4-3696-44d3-86b7-c6ba33a9dc5b@11g2000yqq.googlegroups.com>...
> > I don't believe where you install it is an option presented to you.
>
> Thanks Imageanalyst
>
> I just have a problem with my GUI, I run on a computer with only MCR installed. The GUI works until I push a button that runs a function which imports data from an access database. It says "Error while evaluating uicontrol callback". I am quit sure the MCR support the database toolbox?
>
> Best Regards
>
> Robin
Read the documentation for the compiler. There's lots of things in there! For example, it will tell you that you need to add "%#function" pragmas to your code where you define callbacks as strings. The compiler does not evaluate strings to figure out which functions to include in the compiled code. A better solution is to use function handles.
Cheers,
Cris.
|
|
0
|
|
|
|
Reply
|
Cris
|
9/8/2010 3:59:33 PM
|
|
"Robin " <robinh887@hotmail.com> wrote in message
news:i68a9m$3nt$1@fred.mathworks.com...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> <fce513f4-3696-44d3-86b7-c6ba33a9dc5b@11g2000yqq.googlegroups.com>...
>> I don't believe where you install it is an option presented to you.
>
> Thanks Imageanalyst
>
> I just have a problem with my GUI, I run on a computer with only MCR
> installed. The GUI works until I push a button that runs a function which
> imports data from an access database. It says "Error while evaluating
> uicontrol callback". I am quit sure the MCR support the database toolbox?
Read the first three sections of this documentation page for an explanation
of this issue and suggestions on how to resolve it:
http://www.mathworks.com/help/toolbox/compiler/br2cqa0-2.html
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
slord (13272)
|
9/8/2010 5:16:39 PM
|
|
"Steven_Lord" <slord@mathworks.com> wrote in message <i68gdn$pbi$1@fred.mathworks.com>...
>
>
> "Robin " <robinh887@hotmail.com> wrote in message
> news:i68a9m$3nt$1@fred.mathworks.com...
> > ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> > <fce513f4-3696-44d3-86b7-c6ba33a9dc5b@11g2000yqq.googlegroups.com>...
> >> I don't believe where you install it is an option presented to you.
> >
> > Thanks Imageanalyst
> >
> > I just have a problem with my GUI, I run on a computer with only MCR
> > installed. The GUI works until I push a button that runs a function which
> > imports data from an access database. It says "Error while evaluating
> > uicontrol callback". I am quit sure the MCR support the database toolbox?
>
> Read the first three sections of this documentation page for an explanation
> of this issue and suggestions on how to resolve it:
>
> http://www.mathworks.com/help/toolbox/compiler/br2cqa0-2.html
>
> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com
Thanks Steven and Cris
I have read part of the compiler documentation, but I think I have done much to prevent an error. I have copied some of my code under. The code runs fine on my own computer with matlab, database toolbox and Compiler toolbox installed. When I push the button it only opens the figure(4). I think the problem is the connection to the database.
uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.575 0.5 0.10 0.04],...
'string','Plot ',...
'backgroundcolor',col,...
'callback',@price); %use handle instead of strings!
function totalprice(varargin)
fh=figure(4);
set(fh,'Units','normalized')
set(fh,'Position',[0 0 1 1])
choice=get(hlb2,'value');
conn = database('Database1', '', ''); %name of Database is Database1
curs = exec(conn, 'select * from Prices'); %Prices=name of table in database
setdbprefs('DataReturnFormat','cellarray');
curs = fetch(curs);
y=curs.Data;
test=y(:,[1 4]);
Best Regards
Robin
|
|
0
|
|
|
|
Reply
|
Robin
|
9/8/2010 7:02:08 PM
|
|
"Robin " <robinh887@hotmail.com> wrote in message <i68mjg$e97$1@fred.mathworks.com>...
> "Steven_Lord" <slord@mathworks.com> wrote in message <i68gdn$pbi$1@fred.mathworks.com>...
> >
> >
> > "Robin " <robinh887@hotmail.com> wrote in message
> > news:i68a9m$3nt$1@fred.mathworks.com...
> > > ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> > > <fce513f4-3696-44d3-86b7-c6ba33a9dc5b@11g2000yqq.googlegroups.com>...
> > >> I don't believe where you install it is an option presented to you.
> > >
> > > Thanks Imageanalyst
> > >
> > > I just have a problem with my GUI, I run on a computer with only MCR
> > > installed. The GUI works until I push a button that runs a function which
> > > imports data from an access database. It says "Error while evaluating
> > > uicontrol callback". I am quit sure the MCR support the database toolbox?
> >
> > Read the first three sections of this documentation page for an explanation
> > of this issue and suggestions on how to resolve it:
> >
> > http://www.mathworks.com/help/toolbox/compiler/br2cqa0-2.html
> >
> > --
> > Steve Lord
> > slord@mathworks.com
> > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> > To contact Technical Support use the Contact Us link on
> > http://www.mathworks.com
>
> Thanks Steven and Cris
>
> I have read part of the compiler documentation, but I think I have done much to prevent an error. I have copied some of my code under. The code runs fine on my own computer with matlab, database toolbox and Compiler toolbox installed. When I push the button it only opens the figure(4). I think the problem is the connection to the database.
>
> uicontrol('style','pushbutton',...
> 'units','normalized',...
> 'position',[0.575 0.5 0.10 0.04],...
> 'string','Plot ',...
> 'backgroundcolor',col,...
> 'callback',@price); %use handle instead of strings!
>
> function totalprice(varargin)
> fh=figure(4);
> set(fh,'Units','normalized')
> set(fh,'Position',[0 0 1 1])
> choice=get(hlb2,'value');
>
> conn = database('Database1', '', ''); %name of Database is Database1
> curs = exec(conn, 'select * from Prices'); %Prices=name of table in database
> setdbprefs('DataReturnFormat','cellarray');
> curs = fetch(curs);
> y=curs.Data;
> test=y(:,[1 4]);
>
>
> Best Regards
>
> Robin
The function name should be changed to totalprice=price.
uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.575 0.5 0.10 0.04],...
'string','Plot ',...
'backgroundcolor',col,...
'callback',@price); %use handle instead of strings!
function price(varargin)
fh=figure(4);
set(fh,'Units','normalized')
set(fh,'Position',[0 0 1 1])
choice=get(hlb2,'value');
conn = database('Database1', '', ''); %name of Database is Database1
curs = exec(conn, 'select * from Prices'); %Prices=name of table in database
setdbprefs('DataReturnFormat','cellarray');
curs = fetch(curs);
y=curs.Data;
test=y(:,[1 4]);
Best Regards
Robin
|
|
0
|
|
|
|
Reply
|
robinh887 (10)
|
9/8/2010 7:11:08 PM
|
|
|
6 Replies
579 Views
(page loaded in 0.082 seconds)
|