zoutp.m
来自「neural network fault find relay」· M 代码 · 共 30 行
M
30 行
% 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 + =
减小字号Ctrl + -
显示快捷键?