📄 zoutp.m
字号:
% This function takes the input data set which has been
% arranged in Rx20 and arrange it to get a
% column matrix containing the trip value
% input file : Rx20 matrix
% output file : Rx1 matrix
% Return value : Rx1 matrix
function A=zoutp(ifn)
inpCol=20;
tripThresh=3100;
trip=1;
notrip=0;
ifn='Wb5050_01.out'
[FID,MSG]=fopen(ifn,'rt');
input=fscanf(FID,'%f');
fclose(FID);
A=[];
for i=1:inpCol:(length(input)-inpCol+1),
B=input(i:i+inpCol-1);
B=min(abs(B));
if B < tripThresh
B=trip;
else
B=notrip;
end;
A=[A;B];
end
[RVB,MSG]=fopen(strcat('o',ifn),'wt');
fprintf(RVB,'%d\n',A);
fclose(RVB);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -