Info

此问题已关闭。 请重新打开它进行编辑或回答。

how to replace values in origal text file with caliculated values

2 次查看(过去 30 天)
i have taken values from the text file shown below by using
c = textscan(fid,'%d64%f64%s%s%d64%d64%d64%d64%d64','delimiter', ';','HeaderLines',256);
i have edited the values in c{2} with new values,
now i have to replace old c{2} values to new edited values in the text file and generate same text file as shown below
please let me know how to do it
------------------ Header -------------------------------------
TestDescription
DateTime 06.02.2013;11:50:17
SensorType COMBO1.5 SENSOR
FrameType OFFFRAME
CPOL 0
CPHA 0
Sensor 2
SensorRS485
SensorArmingPinX
SensorArmingPinY
SensorPullResistor
AD 1;2;3;4
Digital
SensorVcc 3.30 V
BurstRate 2000 Hz
MOSICount_Burst 20
SPIRate 40000 Hz
SCLK 8000000 Hz
ToolVersion
FPGAVersion SC 0.10
DeviceName USB <-> SPICE SN: 00009
ProjectFilename Project_Combo1.5.spi-cfg
CommandFilename Bosch_COMBO_1_5_SPI_Commands_and_Replies.h
CommandFileRevision 1.22
CRCTableFilename Bosch_COMBO_1_5_SPI_CRC_Table.c
CRCTableFileRevision 1.4
HW-State;Time[ms];MOSI[hex];MISO2[hex];MISO2-State;AIn1[mV];AIn2[mV];AIn3[mV];AIn4[mV];
------------------ Init Sequence ------------------------------
80;0.000;402B01E8;FFFFFFFF;00; 10;122;1993;1994;
80;0.025;802B00FB;FFFFFFFF;05; 11;123;1995;1996;
80;0.050;806000FE;FFFFFFFF;05; 11;122;1995;1996;
80;0.075;803E00E2;FFFFFFFF;05; 10;121;1993;1994;
80;0.100;803E00E2;FFFFFFFF;00; 11;124;1996;1998;
80;0.125;80500091;FFFFFFFF;00; 10;121;1993;1995;
80;0.150;80510078;FFFFFFFF;05; 10;122;1993;1995;
80;0.175;8052006C;FFFFFFFF;05; 12;123;1995;1997;
80;0.200;80530085;FFFFFFFF;05; 10;122;1993;1994;
80;0.225;80540044;FFFFFFFF;05; 12;123;1995;1997;
80;0.250;805500AD;FFFFFFFF;05; 10;122;1995;1996;
80;0.275;805600B9;FFFFFFFF;05; 10;121;1992;1993;
80;0.300;80570050;FFFFFFFF;05; 11;123;1996;1998;
80;0.325;80580014;FFFFFFFF;05; 10;122;1993;1995;
80;0.350;805900FD;FFFFFFFF;05; 10;122;1994;1995;
80;0.375;805A00E9;FFFFFFFF;05; 12;123;1996;1997;
80;0.400;40290115;FFFFFFFF;05; 10;121;1993;1994;
80;0.425;20000002;FFFFFFFF;05; 11;123;1996;1997;
80;0.450;600000F3;FFFFFFFF;05; 10;122;1995;1995;
80;0.475;A00000CF;FFFFFFFF;05; 10;122;1993;1994;
80;0.500;802F002E;FFFFFFFF;05; 11;123;1996;1998;
80;0.525;803100A6;FFFFFFFF;05; 10;122;1993;1995;
80;0.550;8033005B;FFFFFFFF;05; 11;123;1995;1996;
80;0.575;40290115;FFFFFFFF;05; 11;122;1995;1996;
80;0.600;20000002;FFFFFFFF;05; 10;122;1993;1993;
80;0.625;600000F3;FFFFFFFF;05; 11;123;1996;1998;
80;0.650;A00000CF;FFFFFFFF;05; 10;122;1993;1995;
80;0.675;802F002E;FFFFFFFF;05; 10;122;1993;1994;
80;0.700;803100A6;FFFFFFFF;05; 12;123;1996;1997;
80;0.725;8033005B;FFFFFFFF;05; 10;122;1993;1994;
80;0.750;40290115;FFFFFFFF;05; 10;123;1995;1997;
80;0.775;20000002;FFFFFFFF;05; 11;122;1994;1996;
80;0.800;600000F3;FFFFFFFF;05; 10;121;1992;1994;
80;0.825;A00000CF;FFFFFFFF;05; 12;124;1997;1998;
80;0.850;802F002E;FFFFFFFF;05; 10;122;1993;1995;
80;0.875;803100A6;FFFFFFFF;05; 10;122;1994;1995;

回答(0 个)

此问题已关闭。

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by