Rank: 274535 based on 0 downloads (last 30 days) and 0 file submitted
photo

McLaren

E-mail

Personal Profile:

Civil and Environmental Engineering

Professional Interests:
Fluids and Geotechnics

 

Watch this Author's files

 

Comments and Ratings by McLaren View all
Updated File Comments Rating
21 Apr 2010 Replace strings in text file REPLACEINFILE replaces characters in ASCII file using PERL Author: Pekka Kumpulainen

AH! It was siple, / is a special character, it should be expressed with a \ in front as per the comment above!

...for the next user

20 Apr 2010 Replace strings in text file REPLACEINFILE replaces characters in ASCII file using PERL Author: Pekka Kumpulainen

A host of alternative errors seem to plague me method of calling the function depending on varying my reference to a space as ' ', char(32) or 'char(32)':

??? Error using ==> replaceinfile at 64
Illegal division by zero at -e line 1, <> line 1.

??? Error using ==> replaceinfile at 64
Bareword found where operator expected at -e line
1, near "s///char"
syntax error at -e line 1, near "s///char"
Execution of -e aborted due to compilation errors.

20 Apr 2010 Replace strings in text file REPLACEINFILE replaces characters in ASCII file using PERL Author: Pekka Kumpulainen

Hello,

This may be an obvious error as I am just getting into Matlab,

when I call tthe function:
[s, msg] = replaceinfile('/', ' ', 'data.dat');

i get the error:
??? Error using ==> replaceinfile at 64
Can't do inplace edit on data.dat: File exists.

Any ideas?

I have to do several substitutions in sequence in order to be able process the data appropriately, i imagine doing this by:

[s, msg] = replaceinfile( '/' , ' ' , 'data.dat');
[s, msg] = replaceinfile( ',' , '. ' , 'data.dat');

should this work?

Contact us