美文网首页
read_output

read_output

作者: 锅炉工的自我修养 | 来源:发表于2020-06-03 00:01 被阅读0次

ank_tracing

小结

  • 完成ank_tracing数据的读取

    • 复杂模式,读取所有数据
      image.png
      image.png
    1. 获取列数信息
    • 忽略前两行信息,直接读取第三行
    • 如何对字符串进行切割
  • 2.字符穿切割

https://ww2.mathworks.cn/help/matlab/ref/split.html

    1. 格式化读取多列(e.g. %f*61)

tips:MATLAB 中split要和 strtrim搭配使用,这样才能保证分割时,不会吧段前段后的空格当成一个cell

str_no_empty=strtrim(str);
str_split=split(str_no_empty);
    1. 移动指针位置

https://ww2.mathworks.cn/help/matlab/ref/fseek.html

fid_save=ftell(fid);
fseek(fid,fid_save,'bof'); % shift the fid to the before line begin
tmp=fscanf(fid,FormatSpec);

相关文章

  • read_output

    ank_tracing 小结 完成ank_tracing数据的读取 复杂模式,读取所有数据image.pngima...

网友评论

      本文标题:read_output

      本文链接:https://www.haomeiwen.com/subject/stmuzhtx.html