[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strtok help
From: |
fork |
Subject: |
Re: strtok help |
Date: |
Thu, 2 Sep 2010 16:15:35 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
dirac <ma00101 <at> surrey.ac.uk> writes:
>
>
> Hi everyone,
>
> I have a filename that I would like to make the title of a graph. The
> problem is is that the filename contains underscores and when typing
> "title([num2str(filename)])" I get the title but there are subscripts due to
> the underscores.
If you wanted to change the underscores to something else, use regexprep():
regexprep ('CILR0021A_B8C11_325_HP_2to40mA_MA_2.dat', '_', 'XXX')
You could probably also add backslashes thus, which might feed correctly through
the Tex interpreter:
regexprep ('CILR0021A_B8C11_325_HP_2to40mA_MA_2.dat', '_', '\\_')