filereadで読み込んだファイルを別名で保存するコマンドを知りたいです。
显示 更早的评论
テキストファイル(240313.rtm)を読み込んで、一部を編集し、別名で保存することをしたいです。
saveではうまくいかず、最適な方法があればお教えください。
>> a=fileread('240313.rtm')
a =
'EEM-RTM
5 1
240313_3F_4-5GHz-nn
fffe9
====MATERIAL====
2 xxx 0.25 0.02 "ceil"
2 yyy 0.16 0.025 "wall"
2 zzzz 0.04 0.0265 "floor"
2 4 0 0.15 "concrete"
0
'
>> b=replace(a, 'xxx', '4.0')
b =
'EEM-RTM
5 1
240313_3F_4-5GHz-nn
fffe9
====MATERIAL====
2 4.0 0.25 0.02 "ceil"
2 yyy 0.16 0.025 "wall"
2 zzzz 0.04 0.0265 "floor"
2 4 0 0.15 "concrete"
0
'
save('240313-1.rtm', 'b') %これでは保存できない
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!