matlab矩阵运算读取一下数据形式的txt文件0.0000 19.859375 -1.103516 16.898438 -8.9995120.0005 15.739502 -1.103516 14.151855 -8.0839840.0010 12.687744 -0.950928 11.557861 -7.0158690.0015 10.704102 -1.103516 9.879395 -6.4055180.0020 9.0256

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/21 21:13:03
matlab矩阵运算读取一下数据形式的txt文件0.000019.859375-1.10351616.898438-8.9995120.000515.739502-1.10351614.151855-

matlab矩阵运算读取一下数据形式的txt文件0.0000 19.859375 -1.103516 16.898438 -8.9995120.0005 15.739502 -1.103516 14.151855 -8.0839840.0010 12.687744 -0.950928 11.557861 -7.0158690.0015 10.704102 -1.103516 9.879395 -6.4055180.0020 9.0256
matlab矩阵运算
读取一下数据形式的txt文件
0.0000 19.859375 -1.103516 16.898438 -8.999512
0.0005 15.739502 -1.103516 14.151855 -8.083984
0.0010 12.687744 -0.950928 11.557861 -7.015869
0.0015 10.704102 -1.103516 9.879395 -6.405518
0.0020 9.025635 -0.645752 8.506104 -5.795166
0.0025 7.347168 -0.798340 7.132813 -5.337402
0.0030 6.736816 -0.645752 6.217285 -5.032227
0.0035 5.516113 -0.645752 5.606934 -4.574463
0.0040 5.058350 -0.798340 5.149170 -4.727051
0.0045 4.447998 -1.256104 4.843994 -3.811523
想要将第二列和第三列相加,第四列和第五列相加,然后两个结果相减,得到一个列数据.
编程如下:
[c1 c2 c3 c4 c5] =textread('1.5MSdata.txt','%f%f%f');
A=c2+c3;
B=c4+c5;
lf=A-B;

matlab矩阵运算读取一下数据形式的txt文件0.0000 19.859375 -1.103516 16.898438 -8.9995120.0005 15.739502 -1.103516 14.151855 -8.0839840.0010 12.687744 -0.950928 11.557861 -7.0158690.0015 10.704102 -1.103516 9.879395 -6.4055180.0020 9.0256
[c1 c2 c3 c4 c5] =textread('1.5MSdata.txt','%f%f%f%f%f'); A=c2+c3; B=c4+c5; IIf=A-B; %你少了 几个 %f