![](/img/trans.png)
[英]What is the easiest way to change the colormap in Matlab plots with many lines
[英]What is the easiest way to extract the data from this string with matlab?
我有一个文本文件,其中包含如下格式的数据:
000000:11.315 2049.000000
000000:11.320 2050.000000
000000:11.327 2048.000000
000000:11.333 2050.000000
000000:11.338 2049.000000
000000:11.348 2048.000000
如何将数据提取到三个数组中? 我玩过textscan
,但是我无法找出合适的格式字符串。 (行数当然不是6,而是任意的。)
fid = fopen('dat.txt');
scannedData = textscan(fid, '%f:%f %f', 'CollectOutput', true)
fclose(fid);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.