MATLAB Answers


replace comma by dot

Asked by shaz
on 20 Oct 2012

i have a csv file where comma is present in place of dot

this file needs to be imported to matlab & needs to replace comma by dot


Jan Simon
on 27 Nov 2012

@shaz: Please care about your own questions. Your rate of accepting answers is very low and I find a lot of questions for clarifications, which you did not answer. This demotivates others to help you.

Walter Roberson
on 27 Nov 2012

Please read the guide to tags and retag this question; see


No products are associated with this question.

1 Answer

Answer by Jan Simon
on 20 Oct 2012
 Accepted answer
Data = fileread(FileName);
Data = strrep(Data, ',', '.');
FID = fopen(NewFileName, 'w');
fwrite(FID, Data, 'char');


Jan Simon
on 27 Nov 2012

I've looked in the activity log, but did not find the one, who has deleted the comments.

@shaz: did you delete your comments? If so, please stop doing this, because it makes the complete thread confusing and there reduces the quality of the forum.

Walter Roberson
on 27 Nov 2012

Deletions do not appear in the activity log. The activity log is created by actively querying the database for the records that it still has. The metainfo for the entries is deleted along with the entries being deleted.

Jan Simon
on 27 Nov 2012

In fact. What a pitty. It would be useful to know, if shaz has deleted his comments. Together with the fact, that too many of my questions for clarifications are not answered, it would help me to estimate how useful my activities in his threads are.

Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!