Matlab中如何删除文件的具体一行
有一个文本文件,我需要更改它的一行内容,怎么样把它这行内容删除,并重写[ 本帖最后由 eight 于 2008-5-7 11:32 编辑 ] 原帖由 honeymelon3 于 2008-5-7 10:56 发表 http://www.chinavib.com/forum/images/common/back.gif
有一个文本文件,我需要更改它的一行内容,怎么样把它这行内容删除,并重写
首先,要知道文本文件中内容的存储方式,然后,可以参考此帖:
http://www.chinavib.com/forum/thread-62835-1-3.html
文件格式
TAP,20,TAP0,TAP1,TAP2,TAP3,TAP4,TAP5,TAP6,TAP7,TAP8,TAP9,TAP10,TAP11,TAP12,TAP13,TAP14,TAP15,TAP16,TAP17,TAP18,TAP19
DAC0/1_Pattern0,0,20,40,60,80,a0,c0,e0,100,120,140,160,180,1a0,1c0,'1e0,200,220,240,260 DAC0/1_Pattern1,1,21,41,61,81,a1,c1,e1,101,121,141,161,181,1a1,1c1,'1e1,201,221,241,261 DAC0/1_Pattern2,2,22,42,62,82,a2,c2,e2,102,122,142,162,182,1a2,1c2,'1e2,202,222,242,262 DAC0/1_Pattern3,3,23,43,63,83,a3,c3,e3,103,123,143,163,183,1a3,1c3,'1e3,203,223,243,263 DAC0/1_Pattern4,4,24,44,64,84,a4,c4,e4,104,124,144,164,184,1a4,1c4,'1e4,204,224,244,264 DAC0/1_Pattern5,5,25,45,65,85,a5,c5,e5,105,125,145,165,185,1a5,1c5,'1e5,205,225,245,265 DAC0/1_Pattern6,6,26,46,66,86,a6,c6,e6,106,126,146,166,186,1a6,1c6,'1e6,206,226,246,266 DAC0/1_Pattern7,7,27,47,67,87,a7,c7,e7,107,127,147,167,187,1a7,1c7,'1e7,207,227,247,267 DAC0/1_Pattern8,8,28,48,68,88,a8,c8,e8,108,128,148,168,188,1a8,1c8,'1e8,208,228,248,268 DAC0/1_Pattern9,9,29,49,69,89,a9,c9,e9,109,129,149,169,189,1a9,1c9,'1e9,209,229,249,269
........
这是个FIR滤波器参数文件
文件格式是这样的,例如我想修改这个文件中DAC0/1_Pattern5一行的参数,请问该怎么做
[ 本帖最后由 honeymelon3 于 2008-5-7 11:36 编辑 ] 请楼主根据2楼提示,还有本版关于txt文件存取的精华帖自行完成
页:
[1]