%matlab匹配数字时,是严格按照顺序来的,比如%3.2f,匹配'23.1',会匹配成23.00和1.00,因为textscan是继续读的
str = '23.1 2.3';
C = textscan(str,'%3.2f');
str = '23.1 2.3';
C = textscan(str,'%3.2f');
disp(C{1});
结果:
23.0000
1.0000
2.3000