f

How to get a ordered text combining Text and values

How can I to get a correct label in this case:
In[]: k=18;
Text["My curve for" k "units"]

Out[]: My curve for 18 units

Thanks


 0
misvrne (39)
6/19/2008 10:28:48 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers.

7 Replies
768 Views

Similar Articles

[PageSpeed] 37

k = 18;

Text["My curve for " <> ToString[k] <> " units"]

My curve for 18 units

Bob Hanlon

---- Miguel <misvrne@gmail.com> wrote:
> How can I to get a correct label in this case:
> In[]: k=18;
> Text["My curve for" k "units"]
>
> Out[]: My curve for 18 units
>
> Thanks
>


 0
hanlonr (2279)
6/20/2008 10:11:35 AM
Some examples with increasing levels of format control.

myLabel[value_] := Row[{"My curve for ", value, " units"}]
myLabel[18]

myLabel[value_] :=
Style[Row[{"My curve for ", value, " units"}], 16, "Panel",
Background -> None]
myLabel[18]

myLabel[value_] :=
Style[Row[{"My curve for ", NumberForm[value, {4, 3}], " units"}],
16, "Panel", Background -> None]
myLabel[N[Pi]]

--
David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/

"Miguel" <misvrne@gmail.com> wrote in message
news:g3dcd0$rdv$1@smc.vnet.net...
> How can I to get a correct label in this case:
> In[]: k=18;
> Text["My curve for" k "units"]
>
> Out[]: My curve for 18 units
>
> Thanks
>


 0
djmpark (1335)
6/20/2008 10:12:07 AM
On 6/19/08 at 6:28 AM, misvrne@gmail.com (Miguel) wrote:

>How can I to get a correct label in this case: In[]: k=18; Text["My
>curve for" k "units"]

>Out[]: My curve for 18 units

Use

Text["My curve for "<>ToString[k]<>" units"]


 0
6/20/2008 10:13:13 AM

Hi Miguel,

try e.g:

k=18;

StringForm["My curve for  units",k]

hope this helps, Daniel

Miguel wrote:

> How can I to get a correct label in this case:

> In[]: k=18;

> Text["My curve for" k "units"]

>

> Out[]: My curve for 18 units

>

> Thanks

>

--

Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh@metrohm.com>

Internet:<http://www.metrohm.com>


 0
dh142 (1271)
6/20/2008 10:16:17 AM
"Miguel" <misvrne@gmail.com> schrieb im Newsbeitrag
news:g3dcd0$rdv$1@smc.vnet.net...
> How can I to get a correct label in this case:
> In[]: k=18;
> Text["My curve for" k "units"]
>
> Out[]: My curve for 18 units
>
> Thanks
>

I would suggest to use StringJoin and ToString.
Example:
k = 123;
s = StringJoin["My curve for ", ToString[k], " units"]

"My curve for 123 units"

Regards,
Wolfgang


 0
weh (219)
6/20/2008 10:16:39 AM
Miguel wrote:

> How can I to get a correct label in this case:
> In[]: k=18;
> Text["My curve for" k "units"]
>
> Out[]: My curve for 18 units

Convert the value of k into a string of characters with *ToString[]* and
concatenate all the strings to keep them ordered with *StringJoin[]*
(shortcut <> ).

In[1]:= k = 18;
Text["My curve for " <> ToString[ k ] <> " units"]

Out[2]= (Text["My curve for 18 units"])

Regards,
-- Jean-Marc


 0
6/20/2008 10:16:50 AM
Miguel wrote:
> How can I to get a correct label in this case:
> In[]: k=18;
> Text["My curve for" k "units"]
>
> Out[]: My curve for 18 units
>

Hello Miguel,

I can offer two solutions:

Graphics[Text@StringForm["My curve for  units", k]]

(Note that StringForm is just *displayed* this way, but it does not
actually return a string.)

Graphics[Text["My curve for " <> ToString[k] <> " units"]]

I hope this helps,
Szabolcs


 0
szhorvat (1435)
6/20/2008 10:17:22 AM

Similar Artilces:

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

How to get text in text box to wrap?
The variable {job-name} in this code snippet does NOT wrap, resulting in the text running off the page. How would I get job-name to word wrap? pageWidth 36 mul % x = pageWidth * 1/2 * 72 pageHeight 36 mul % y = pageHeight * 1/2 * 72 pageHeight 2 mul add % y += 1 line 2 copy % Copy X & Y moveto (Title: ) RIGHT moveto ({job-name}) show This postscript file is from the CUPS printing application on a Linux system. Here is the complete file: FILE: /usr/share/cups/banners/standard %!PS-Adobe-3.0 %%BoundingBox: 0 0 612 792 %%Pages: 1 %%LanguageLevel: 1 %%DocumentData: Clean7Bit %%DocumentSuppliedResources: procset bannerprint/1.0 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman %%Creator: Michael Sweet, Easy Software Products %%CreationDate: May 10, 2000 %%Title: Test Page %%EndComments %%BeginProlog %%BeginResource procset bannerprint 1.1 0 % % PostScript banner page for the Common UNIX Printing System ("CUPS"). % % Copyright 1993-2005 Easy Software Products % % These coded instructions, statements, and computer programs are the % property of Easy Software Products and are protected by Federal % copyright law. Distribution and use rights are outlined in the file % "LICENSE.txt" which should have been included with this file. If this % file is missing or damaged please contact Easy Software Products % at: % % Attn: CUPS Licensing Information % Easy Software Products % 44141 Airport View Drive...

Extract Text from a Checkbox and add text between values

How to get selected text from a text edit control?
I created a text edit control using CreateEditTextControl. I can get the current text by calling char buf[256]; Size textSize = 0; GetControlData(controlRef, kControlEditTextPart, kControlEditTextTextTag, 255, buf, &textSize); but how do I get only the text that is currently selected (highlighted)? thanks, Shai In article <1111086224.345185.78280@g14g2000cwa.googlegroups.com>, shai@waves.com wrote: > I created a text edit control using CreateEditTextControl. > I can get the current text by calling > > char buf[256]; > Size textSize = 0; ...

pdf \ text (get rid of text in pdf)
Is there a way to remove all text from PDF? Will extract images work for you? If so, PDF-Tools by Tracker Software will do it. http://www.docu-track.com/ -- Don Vancouver, USA "MarosV" <maros.vranec@gmail.com> wrote in message news:ebb897e1-c8e3-4b3a-9274-dfd9d2c845c3@c4g2000hsg.googlegroups.com... > Is there a way to remove all text from PDF? ...

Surrounding text with text
I was wondering if it was possible to surround a text body with text like so: +--------------+ |ABCDEFGHIJKLM | |H N| |A Main Body O| |L Text goes P| |B here Q| |-=+_ZYXWVUTSR | | | | | | | | | +--------------+ This seems far-fetched, but just curious. I suppose that I could just move stuff around by hand in the GIMP later on, but there's probably a {better,more {extensible,clean}} way of doing it from (La)TeX. -FreeSmith ptjm@interlog.com (Patrick TJ McPhee) wrote in message news:<bffbhe$per$1@news.eusc.inter.net>... > Peter Flynn had an example like that, which he either posted here or > posted a link here. It was something to do with a certificate -- try > searching for his name and that word in google. > > It wouldn't be hard to do with metapost. I have a macro called `pathalong' > which puts text along an arbitrary path. Well, it's been a while, but I finally finished it. It's a little job I was doing for an upcoming wedding. At any rate, I used pstricks to make the text go along a path, along with a couple of hacks for sizing (from graphicx) and kerning along the line (from soul). Here's the code (don't laugh): CAUTION:THIS CODE MAY MAKE YOU WRETCH ---SNIP--- \documentclass{article} \usepackage{graphicx} \usepackage{pstricks,pst-text,nopageno} \usepackage[width=8.5in]{geometry} \usepackage{soul} \begin{document} \thispagestyle{empty} \set...

How to get the value from a text filed ?
Hi all, I want to ask how can i get the value in a text field and save to database. My database is Oracle 9i and using Louts Domino 7. THx a lot Match That's kind of a vague question.... What language? @Formula, LS, Java ? You want to store a textfield from a NotesDocument to a Record in your oracle 9i db? matchsin@gmail.com schrieb: > Hi all, > I want to ask > how can i get the value in a text field and save to database. > My database is Oracle 9i and using Louts Domino 7. > > THx a lot > Match > Yes...... I am using loutsscri...

getting text files out of Mathematica
A real problem with publishing is text tiles of Mathematica code. If you ask for a text file it comes up with a lot of nasty characters... It didn't used to be so in 2.2... Also the Pst Script files have changed: you used to be able to append too graphics on over another by editing the post script, but it does work , but old files with such appending still translate to current files... And then there is the eternal crashing... I get Parametric 3D's that just go somewhere seemingly forever and you can't break them with out breaking Mathematica... I admit to pushing th...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

Pages
I have a titel-textfield over a pic (headline) , text is black, background for text transparent. A second textfield should overlapp the first textline..... When i arrange the second field with the same settings like the first, the first text disappear... How can i do, that the second text overpapps the first, all over the pic. Any help appreciated! Thanks for replies! I am german and hope that the engish speaking people understand my problem! Soory! Gerd In article <611db9e2-b085-4fe5-907a-ca714b0c32dd@m74g2000hsh.googlegroups.com>, hurlebaus <gerd.schenk@freenet.de> wrote:...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi... How to search list of particular text values into free text Hi All, Please if anyone has idea about how to search particular list of text values from one small table to free text variable in large dataset and when finds the value, update the large dataset. I have small lookup table (around 120 records) for example: Category Types; Type_1 Mangos, Type_1 Pineapples, Type_2 Onions, Type_2 Tomatoes, … Type_n typeN. Now I need to search each particular text values (variable-Types) from the above small table into my large dataset which has free text variable called “Order_details”. For example: Order_details: The last order was for the Mangos on Nov 11... Getting kind of abstract text snippets from text nodes Hi everybody, I am about implementing a little search engine that searches a phrase over xml text nodes. I got that all working fine but what I want as the results is not the complete text of the textnode, I would like to make an abstract like result list (such output that you get with google searches. For eg .... I am the <b>substring</b> from a complete text node ... where "substring" is the search term. The problem is simple (I think): I want to extract all the text parts of the complete text node, where search searchterm is highlighted, surrounded by the text like 30 characters. I found an intersting post "cut down text" which is almost that what I am looking for, but there the text is just trimmed by x characters. Is anybody here, that has an "elegant" way to solve that or some hints that get me to the solution? I am not able to use regex (would be nice though) My parser is Sablotron so I am restricted to the functions that I get. (1.0). Any help is greatly appreciated. regards, Andreas W Wylach Think about dividing the text into three parts: before your target, the target itself, and after the target. Process each appropriately. If you want to report multiple instances within the same block of text, look at the standard examples of recursive text processing. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry "Andreas W. Wylach" <aw@ioc... Placing text in PICT, problem getting text all the way to the bottom 49G+ I am creating a PICT to view in my program. One of the things I am doing it placing labels on the drawing. I use a short line of code below to place a simple string in small text in the drawing: { # 40h # 49h } "Label" 1. \->GROB PICT ROT ROT GOR I want the text to be at the very bottom, every pixel counts kinda thing, and when I use { # 40h # 50h } I get an error and the text is two pixels up from the bottom. Any advice to get it all the way down to the bottom or this not possible on the 49G+. >I am creating a PICT to view in my program. One of the things I am &g... PHP - using mail() and unicode text I have the following problem. On a website there's a (simple) feedback form. This is used also by Polish visitors who (of course) type Polish text using special characters. However, when I receive the text in my mailbox, all special characters have been turned into mess...... For example: "wsp�lprace" is turned into "współprace". It seems PHP is handling the Unicode-8 strings quite well (when I 'echo' the strings on the site, I see the text correctly), until the point that it is send by using mail(). Is this a server configuration issue? Or something el... How can i get value of text area? i have two files 1)index.php and 2)code.js now code in index.php is below <html> <head> <script src=3D"http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquer= y.min.js"></script> <link href=3D"http://web.guru99.com/lib/codemirror.css" rel=3D"styleshe= et" /> <script type=3D"text/javascript" src=3D"code.js"></script> <style type=3D"text/css"> .CodeMirror { border: 1px solid #eee; height: auto; } .CodeMirror-scroll { height: auto; overflow-y: hidden; overflow-x: auto; } </style> </head> <body> Integer : whole numbers e.g. -3, 0, 69. The maximum value of an integer= is platform-dependent. On a 32 bit machine, its usually around 2 billion. = 64 bit machines usually have larger values. The constant PHP_INT_MAX is use= d to determine the maximum value. <pre class=3D"codeguru">say 'hi';</pre> Let us now look at how PHP determines the data type depending on the at= tributes of the supplied data. <pre class=3D"codeguru">say 'hello';</pre> Floating point numbers <pre class=3D"codeguru">say 'you r amazing';</pre> Character strings <pre class=3D"codeguru">say 'i am fine';</pre> ... How to combine handles value and text in legend? Example: handles.input1 = 10; and I would like to add this value to 'm' in a legend so that it can be labeled as '10m'. Thanks, two possibilities: [num2str(handles.input1) 'm'] sprintf('%dm', handles.input1) Titus "ghuynh" <huynh@arl.army.mil> schrieb im Newsbeitrag news:ef0f790.-1@webx.raydaftYaTP... > Example: > > handles.input1 = 10; > > and I would like to add this value to 'm' in a legend > so that it can be labeled as '10m'. > > Thanks, Titus Edelhofer wrote: > > >... Get value from a text file (newbie) Hello, I have a question about the possibility to read some informations in a text file. For example, I have a entity 'scaler'. Can I do something like architecture Behavioral of scaler0 is component scaler generic ( ???) port ( clr : in std_logic; clk : in std_logic; d : in std_logic_vector(15 downto 0); q : out std_logic_vector(15 downto 0)); end component; begin scaler0_c : scaler generic map ( ??? => 'filename of file containing initialisation data') port map (...... ...... end Behavioral; Thank you in ad... Re: How to search list of particular text values into free text #2 Sorry, there was a minor error, b.types should be b.category: proc sql; create table xx as select distinct a.srno,a.order_details, max(case when a.order_details contains trim(b.types) then b.category else '' end) as btype from large_table a, smalltable b group by a.srno order by a.srno ; proc print; run; Srno Order_details btype 1 The order of Mangos .. Type_1 10 Retured all Potatoes.. Type_2 2 The returned order .. Type_1 3 Order for the Oranges .. Type_1 4 new container for the Onions .. Type_2 5 Boxes o... Re: How to search list of particular text values into free text #3 This one may not be efficient when look up table are big, but at least it saves your typing: proc sql; create table xx as select distinct a.srno,a.order_details, max(case when a.order_details contains trim(b.types) then b.types else '' end) as btype from large_table a, smalltable b group by a.srno order by a.srno ; proc print; run; Srno Order_details btype 1 The order of Mangos .. Mangos 10 Retured all Potatoes .. Potatoes 2 The returned order .. Mangos 3 Order for the Oranges .. ... How do I get Voice-to-Text back in my Android 4.3 for SMS texting? All of a sudden, I lost the little microphone icon in my default SMS text application on the T-Mobile Samsung Galaxy S3 on Android 4.3. http://farm8.staticflickr.com/7373/12344496284_046d7946d1_o.png This is an important omission, since I do offline speech-to-text SMS text messages (I almost never use my fat fingers to text). To get back that offline microphone app, I suspect I need to *install* something, because it *was* there from the beginning - but now it's (suddenly) gone! But what free app do I download to get *back* that little microphone? On Thu, 06 Feb 2014 15:43:25 +0000, Danny D'Amico wrote: > But what free app do I download to get *back* that little microphone? Googling, I first thought that little microphone which is now missing in the keyboard might have originally come from "Google Voice Search": https://play.google.com/store/apps/details?id=com.google.android.voicesearch But, "Google Voice Search" is already installed, and has been installed since before I upgraded from Android 4.2.1 to Android 4.3. http://farm8.staticflickr.com/7323/12347746965_fb97022d25_o.jpg Q: What is the app that adds a microphone to the standard keyboard? On Thu, 06 Feb 2014 09:12:07 -0800, jurb6006 wrote: > I don't know if this applies to you but a friend of mine said he had that > for a time and later found out it was only a free trial and then they > wantted money. He no longer has it. We... Getting float values from a formatted text file Hi All I want to read certain values from text file and need help. My text file looks like the following 32 Fed 2044 25:61:61 Asdfg-Asdfg Data Unavailable Yaqw (UUUUU) Qwe (321) (deg) Asdfg (321) (deg) Yxcv (321) (deg) ----------------------- --------------- ----------------- ---------------- 32 Def 2022 10:00:00.040 56.001 -0.001 0.137 32 Def 2022 10:00:00.060 56.000 -0.001 0.112 32 Def 2022 10:00:00.080 56.000 -0.001 0.112 Yaqw (UTCG) i (re) h (re) g (re) ----------------------- ----------- --------- -------- 32 Def 2022 10:00:00.000 6378.139002 -0.000844 0.000000 32 Def 2022 10:00:00.020 6378.139001 -0.000504 0.000000 32 Def 2022 10:00:00.040 6378.139001 -0.000255 0.000000 I want the values 56.001, -0.001, 0.137, 6378.139002 etc.. in an array.. I have written the follownig code but it doesn't work. It returns error 'First argument must be a string' On 3/27/2013 12:41 PM, Abubakar Rehman wrote: .... > My text file looks like the following > > 32 Fed 2044 25:61:61 > Asdfg-Asdfg > > > Data Unavailable > > > Yaqw (UUUUU) Qwe (321) (deg) Asdfg (321) (deg) Yxcv (321) (deg) > ----------------------- ---------... Can't get text to be recognized as text when figure is oriented tall or portrait Hey folks, If I have a figure and I type: figure(1); orient landscape; print -f1 -dpsc 'myfig.ps'; when I import it into Corel everything comes out fine and the text is text. If I take the same figure and do: figure(1); orient tall; %or orient portrait; print -f1 -dpsc 'myfig.ps'; Corel doesn't understand that the text is text, and just uses curves, which is a real pain. Anyone with any idea as to what's going on? Thanks! I found that this opens fine in illustrator, but I use Corel. There seems to be a difference in the encoding that Corel can't handle in... Web resources about - How to get a ordered text combining Text and values - comp.soft-sys.math.mathematica Protein combining - Wikipedia, the free encyclopedia Protein nutrition is complex because any proteinogenic amino acid may be the limiting factor in metabolism . Mixing livestock feeds can optimize ... Facebook Combining$50 Ad Credits and 3 Simpler Ad Tools to Attract Small Businesses
Facebook will this week announce a new push to get small businesses using the site for marketing, according to USA Today . Facebook COO Sheryl ...

Stitch It! - Edit & share screenshots! - Combining screengrabs as a seamless vertical collage! on the ...
Get Stitch It! - Edit & share screenshots! - Combining screengrabs as a seamless vertical collage! on the App Store. See screenshots and ratings, ...

The Cruise Director: combining cruise and rail holidays
Combining a cruise with a rail journey is an increasingly popular choice around the world.

High paying job in Australia: Data scientist combining maths, marketing - DailyTelegraph Search Search ...
MATHS and marketing are the keys to a big pay packet, with one new occupation offering $200,000 a year and predicted to become a staple in businesses ... High paying job in Australia: Data scientist combining maths, marketing MATHS and marketing are the keys to a big pay packet, with one new occupation offering$200,000 a year and predicted to become a staple in businesses ...

Combining last names
... couples have come up with an interesting solution. CBC.ca home Help Search the CBC Player Submit Search News - Oct 17, 2013 - 10:36 Combining ...

Combining Political Trips With Official Business Isn't New At All
OTTAWA - Announcement, political rally, photo-op, political rally, announcement, repeat as needed.The prime minister's travel agenda these days ...

Combining utilization of two items - People's Daily Online
EditedandtranslatedbyLiQian,People'sDailyOnlineWorn-outsilkstockingsarenotsuitabletow

Resources last updated: 3/16/2016 5:14:26 AM