<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META content="text/html; charset=iso-8859-1" http-equiv=Content-Type><META content="MSHTML 5.00.3700.6699" name=GENERATOR><STYLE></STYLE></HEAD><BODY bgColor=#ffffff><DIV><FONT face=Arial size=2>Hi vrf,</FONT></DIV><DIV> </DIV><DIV><FONT face=Arial size=2>we are working on a program with matlabscript. It is no problem to create a plot, but how can we tell matlab to display a single variable (calculated) number with text?</FONT></DIV><DIV> </DIV><DIV><FONT face=Arial size=2>Best greatings</FONT></DIV><DIV><FONT face=Arial size=2>martin hauder</FONT></DIV><DIV><FONT face=Arial size=2>------------------------------------------------------------------<BR>mdh technology GmbH<BR>Dr. Martin Hauder<BR>Eberspoint, Fliederstr. 11<BR>84149 Velden, Germany</FONT></DIV><DIV> </DIV><DIV><FONT face=Arial size=2>Tel.: +49 (0)8742/967138<BR>Fax: +49 (0)8742/967138</FONT></DIV><DIV> </DIV><DIV><FONT face=Arial size=2>(Niederlassung Ebersberg)<BR>mdh technology GmbH<BR>Reith 1a<BR>85560 Ebersberg, Germany<BR>Tel: 08092/868523<BR>Fax: 08092/868523</FONT></DIV><DIV> </DIV><DIV><FONT face=Arial size=2><BR>Mobil: 0160/91981875<BR>E-mail: <A href="mailto:hauder@mdh-technology.de">hauder@mdh-technology.de</A> <BR><A href="http://www.mdh-technology.de">http://www.mdh-technology.de</A></FONT></DIV>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list, email "vrf@agilent.com". <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>
Martin,
What you need is a uicontrol with a style of 'text'. See the MATLAB Script
help for lots of details. A simple example is
h=uicontrol(gcf,'style','text','units','normalized',...
'position',[x,y,width,height],...
'string',num2str(<a variable or expression here>))
gcf returns the handle of the current figure
the position vector is the x,y coordinates and width and height of the box,
in this case expressed as a fraction of the figure width and height
num2str() is the easiest way to convert your number to a string. You could
build a longer string with bracket notation. For example:
['Mean(x) = ',num2str(mean(x))]
You can get formatted strings with the sprintf() function
--
Bill Ossmann
Philips Ultrasound
e-mail: bill.ossmann@philips.com
-------------------------------------------------------
Hi vrf,
we are working on a program with matlabscript. It is no problem to create a
plot, but how can we tell matlab to display a single variable (calculated)
number with text?
Best greatings
martin hauder
------------------------------------------------------------------
mdh technology GmbH
Dr. Martin Hauder
Eberspoint, Fliederstr. 11
84149 Velden, Germany
Tel.: +49 (0)8742/967138
Fax: +49 (0)8742/967138
(Niederlassung Ebersberg)
mdh technology GmbH
Reith 1a
85560 Ebersberg, Germany
Tel: 08092/868523
Fax: 08092/868523
Mobil: 0160/91981875
E-mail: hauder@mdh-technology.de
http://www.mdh-technology.de
---
You are currently subscribed to vrf as: bill.ossmann@philips.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".