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:
'\rightarrow' in text problem

Subject: '\rightarrow' in text problem

From: J G

Date: 17 Apr, 2011 05:40:05

Message: 1 of 3

I'm using the following code, however I want to include a '\rightarrow'. If I include this in the string I get an error because the latex interpreter doesn't work. How can I keep the 'p*' in latex but include a '\rightarrow' too?

text('Interpreter','latex',...
'String','${p*}$',...
'Position',[0,0.347],...
'FontSize',12)

Thanks, J.

Subject: '\rightarrow' in text problem

From: Wayne King

Date: 17 Apr, 2011 09:30:19

Message: 2 of 3

"J G" wrote in message <iodufk$n7d$1@fred.mathworks.com>...
> I'm using the following code, however I want to include a '\rightarrow'. If I include this in the string I get an error because the latex interpreter doesn't work. How can I keep the 'p*' in latex but include a '\rightarrow' too?
>
> text('Interpreter','latex',...
> 'String','${p*}$',...
> 'Position',[0,0.347],...
> 'FontSize',12)
>
> Thanks, J.

Hi J, I'm not sure I understand your problem exactly, does this work for you?

 text(x,y,'$p* \rightarrow$','Interpreter','latex',...
'FontSize',12)

because it works for me. Is this not what you want?

Wayne

Subject: '\rightarrow' in text problem

From: J G

Date: 17 Apr, 2011 21:00:20

Message: 3 of 3

"Wayne King" <wmkingty@gmail.com> wrote in message <ioebvb$e2f$1@fred.mathworks.com>...
> "J G" wrote in message <iodufk$n7d$1@fred.mathworks.com>...
> > I'm using the following code, however I want to include a '\rightarrow'. If I include this in the string I get an error because the latex interpreter doesn't work. How can I keep the 'p*' in latex but include a '\rightarrow' too?
> >
> > text('Interpreter','latex',...
> > 'String','${p*}$',...
> > 'Position',[0,0.347],...
> > 'FontSize',12)
> >
> > Thanks, J.
>
> Hi J, I'm not sure I understand your problem exactly, does this work for you?
>
> text(x,y,'$p* \rightarrow$','Interpreter','latex',...
> 'FontSize',12)
>
> because it works for me. Is this not what you want?
>
> Wayne



Hi Wayne,
This works thanks for your help!

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