From: Judy on
Hi everybody,

Is there a way to get around the ' in matlab?

Best to show an example:

dir='C:\filefolder\filename_1'_comments.txt';

Can I leave that ' after the 1 or is it necessary to take it out? If so, how?

Thanks....
From: Jan Simon on
Dear Judy,

> Is there a way to get around the ' in matlab?
> Best to show an example:
> dir='C:\filefolder\filename_1'_comments.txt';
> Can I leave that ' after the 1 or is it necessary to take it out? If so, how?

Of course you can take it out by taking it out:
dir='C:\filefolder\filename_1_comments.txt';

I assume, you search for the possibility to *insert* a quote character in a string?! Then use:
dir='C:\filefolder\filename_1''_comments.txt';
These are 2 quote characters, not a double quote.

Jan
From: us on
"Judy " <sauwen.jl(a)gmail.com> wrote in message <i0j3k4$8c1$1(a)fred.mathworks.com>...
> Hi everybody,
>
> Is there a way to get around the ' in matlab?
>
> Best to show an example:
>
> dir='C:\filefolder\filename_1'_comments.txt';
>
> Can I leave that ' after the 1 or is it necessary to take it out? If so, how?
>
> Thanks....

a hint:
- just ...take it out... :-)
- more seriously: do NOT create a var named DIR
as it clashes with the built-in ML function... DIR...

us