MATLAB: Replace comma by dot

.mdecimal commadecimal pointdecimal radixradix pointretag

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

Best Answer

Data = fileread(FileName);
Data = strrep(Data, ',', '.');
FID = fopen(NewFileName, 'w');
fwrite(FID, Data, 'char');
fclose(FID);