?? readlab.m
字號:
function [qs,zz,num]=readlab(file)
fid=fopen(file,'r','b');
if fid < 0
error(sprintf('Cannot read from file %s',file));
end
F= fread(fid,'uchar');
j=1;
for i=1:4
b=0;
while F(j) ~= 32
aa=F(j);
j=j+1;
aa=aa-48;
b=b*10+aa;
end
j=j+1;
qs(i)=b;
b=0;
while F(j) ~= 32
aa=F(j);
j=j+1;
aa=aa-48;
b=b*10+aa;
end
j=j+1;
zz(i)=b;
b=0;
while F(j) ~= 10
aa=F(j);
j=j+1;
b=b+aa;
end
num(i)=b;
j=j+1;
end
for i=1:4
switch num(i)
case {236}
num(i)=5;
case {422}
num(i)=7;
case {195}
num(i)=8;
case {330}
num(i)=6;
case {523}
num(i)=2;
case {322}
num(i)=3;
case {220}
num(i)=4;
case {331}
num(i)=9;
case {424}
num(i)=0;
case {329}
num(i)=1;
otherwise
num(i)=num(i);
end
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -