我有一个像这样的文本文件:
0,472412
0,455627
0,439148
0,421753
...
0,116577
0,086670
0,057373
0,027161
如何在matlab中将逗号转换成点?
最佳答案
This post在 Matlabs 网站上建议:
function comma2point_overwrite( filespec )
% replaces all occurences of comma (",") with point (".") in a text-file.
% Note that the file is overwritten, which is the price for high speed.
file = memmapfile( filespec, 'writable', true );
comma = uint8(',');
point = uint8('.');
file.Data( transpose( file.Data==comma) ) = point;
delete(file)
end
关于matlab - 将逗号转换为点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13142359/