Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How can I show the result of the fitting in text box?
Replies: 3   Last Post: Feb 14, 2013 9:49 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Amr Sadek

Posts: 8
Registered: 2/13/10
Re: How can I show the result of the fitting in text box?
Posted: Feb 14, 2013 3:55 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <kfgn2p$u4q$1@speranza.aioe.org>...
> On 2/13/2013 8:42 AM, Amr Sadek wrote:
> > I have a GUI that fits some data with custom equations. I want to show
> > the result of the fitting process (the equation, the Coefficients and
> > the goodness of the fitting) on a text box in the GUI instead of the
> > MATLAB command window.
> > Thanks...

>
> How are you obtaining the coefficients, etc., ...?
>
> Instead of letting that output go to the command window, save it to
> appropriate variables and then use sprintf() and/or friends to format as
> desired as input to the text box.
>
> --

This is the main problem. I can't save it to variables. Here is an example;
-------------------------------------------------------------------------------------------------------------------
FIT2GOK =
General model:
FIT2GOK(T) = (no).*S.*exp(-E./(K.*T)).* (1+(b-1).*(S/R).*(((K.*T.^2./(E+
(2.*K.*T)))).*exp(-E./(K.*T)))-((K.*Ti.^2./(E+(2.*K.*Ti)
))).*exp(-E./(K.*Ti))).^(-b./(b-1))
Coefficients (with 95% confidence bounds):
E = 1.71 (1.707, 1.713)
S = 2.573e+13 (2.435e+13, 2.712e+13)
b = 1.261 (1.222, 1.299)
no = 579 (567.8, 590.2)
Problem parameters:
R = 3
Ti = 374
K = 8.617e-05
--------------------------------------------------------------------------------------------------------------------
The variable name is "FIT2GOK". I can't send this variable directly to the text box because of this error:
---------------------------------------------------------------------------------------------------------------------
Error using set
error: mxArray must be double, char, or cell
---------------------------------------------------------------------------------------------------------------------



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.