Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
tilde in Matlab string

Subject: tilde in Matlab string

From: samira

Date: 22 Nov, 2004 06:08:16

Message: 1 of 8

Hallo all,

I need to write a tilde above a character in a string, but the
problem is that matlab can not interprate the Tex string "\tilde(x)"
, I found the Tex string \sim but I can not put it iover a character

Does somebody know how to do??

Thanks

Samira

Subject: tilde in Matlab string

From: Roberto

Date: 22 Nov, 2004 11:33:31

Message: 2 of 8


"samira" <bouataa@hotmail.com> ha scritto nel messaggio
>
> I need to write a tilde above a character in a string, but the
> problem is that matlab can not interprate the Tex string "\tilde(x)"
> , I found the Tex string \sim but I can not put it iover a character
>
> Does somebody know how to do??

open notepad.exe
type ALT-126
copy
past in matlab
:-)
bye

Subject: tilde in Matlab string

From: Daniel Thuresson

Date: 22 Nov, 2004 13:01:08

Message: 3 of 8


"samira" <bouataa@hotmail.com> wrote in message
news:eef3b3e.-1@webx.raydaftYaTP...
> Hallo all,
>
> I need to write a tilde above a character in a string, but the
> problem is that matlab can not interprate the Tex string "\tilde(x)"
> , I found the Tex string \sim but I can not put it iover a character
>
> Does somebody know how to do??
>
> Thanks
>
> Samira

I'm afraid you can't do that, but please, correct me if I'm wrong.

/Daniel

Subject: tilde in Matlab string

From: us

Date: 22 Nov, 2004 07:23:27

Message: 4 of 8

samira:
<SNIP wants a tilde above a character in a string...

a hint (requires r14+):

     text(.5,.5,...
         '$\tilde x$',...
         'interpreter','latex');

us

Subject: tilde in Matlab string

From: Perttu Ranta-aho

Date: 22 Nov, 2004 14:26:29

Message: 5 of 8


Hi,

Daniel Thuresson wrote:

> "samira" <bouataa@hotmail.com> wrote in message
>> I need to write a tilde above a character in a string, but the
>> problem is that matlab can not interprate the Tex string "\tilde(x)"
>> , I found the Tex string \sim but I can not put it iover a character
>
> I'm afraid you can't do that, but please, correct me if I'm wrong.

In R14 you can:

th=text(.5,.5,'$\tilde{x}$','interpreter','latex')

_perttu

Subject: tilde in Matlab string

From: Daniel Thuresson

Date: 22 Nov, 2004 13:46:51

Message: 6 of 8


"Perttu Ranta-aho" <rantaaho@uku.fi> wrote in message
news:cnsltl$19o4$1@luotsi.uku.fi...
>
> Hi,
>
> Daniel Thuresson wrote:
>
>> "samira" <bouataa@hotmail.com> wrote in message
>>> I need to write a tilde above a character in a string, but the
>>> problem is that matlab can not interprate the Tex string "\tilde(x)"
>>> , I found the Tex string \sim but I can not put it iover a character
>>
>> I'm afraid you can't do that, but please, correct me if I'm wrong.
>
> In R14 you can:
>
> th=text(.5,.5,'$\tilde{x}$','interpreter','latex')
>
> _perttu

Well I don't have that fancy new stuff... I'm a year behind version-wise
thanks to my tech support (they have to make a remote installation package
first, and that takes about a year or so).

/D

Subject: tilde in Matlab string

From: Doug Schwarz

Date: 22 Nov, 2004 23:16:03

Message: 7 of 8

In article <cnsn40$a21$1@eol.dd.chalmers.se>,
 "Daniel Thuresson" <daniel.thuresson@me.chalmers.se> wrote:

> "Perttu Ranta-aho" <rantaaho@uku.fi> wrote in message
> news:cnsltl$19o4$1@luotsi.uku.fi...
> >
> > Hi,
> >
> > Daniel Thuresson wrote:
> >
> >> "samira" <bouataa@hotmail.com> wrote in message
> >>> I need to write a tilde above a character in a string, but the
> >>> problem is that matlab can not interprate the Tex string "\tilde(x)"
> >>> , I found the Tex string \sim but I can not put it iover a character
> >>
> >> I'm afraid you can't do that, but please, correct me if I'm wrong.
> >
> > In R14 you can:
> >
> > th=text(.5,.5,'$\tilde{x}$','interpreter','latex')
> >
> > _perttu
>
> Well I don't have that fancy new stuff... I'm a year behind version-wise
> thanks to my tech support (they have to make a remote installation package
> first, and that takes about a year or so).
>
> /D


Well then you might like my Styled Text Toolbox. It is free and
available from

  <http://www.frontiernet.net/~dmschwarz/stextfun/>

or as a single file (courtesy of Urs)

  <http://www.frontiernet.net/~dmschwarz/stextfun/stextfun.zip>


To do what you want the syntax is not quite the same as in LaTeX:

  stext(x,y,'x\tilde')

but read the instructions for more details.

--
Doug Schwarz
dmschwarz&urgrad,rochester,edu
Make obvious changes to get real email address.

Subject: tilde in Matlab string

From: us

Date: 22 Nov, 2004 18:20:24

Message: 8 of 8

Doug Schwarz:
<SNIP unimportant stuff...

GREAT and HAPPY to see you alive and back <douglas>!!!!!
urs, from schwarz to schwarz

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us