filereadで読み込んだファイルを別名で保存するコマンドを知りたいです。
Afficher commentaires plus anciens
テキストファイル(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') %これでは保存できない
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Genomics and Next Generation Sequencing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!