textread的用法
tempText = textread(fileName);
NodeNum = tempText(1,1);
PathNum = tempText(1,2)
ClientNum = tempText(1,3);
CosePerServer = tempText(2,1);
textscan的用法
fid = fopen(\'Quan_IRA_QC_g6_3_2_509_Iter20_Msg8_Quan2.txt\');
C1 = textscan(fid, \'%f %f %f %f \');
fclose(fid);
x1 =10*(log10(1./ (C1{:,1}.^2)));%0.9
y1 =( C1{:,3});
y2=C1{:,2};
semilogy(x1,y1,\'LineStyle\',\'-\',\'Marker\',\'^\',\'MarkerSize\',markersize,...
\'LineWidth\',2,\'Color\',[0.7490 0 0.7490],\'DisplayName\',\'(3,4) Quan1 = 0.05\');
xlabel(\'E_b/N_0 (dB)\',\'fontsize\',14);
ylabel(\'BER\',\'fontsize\',14);
请发表评论