📄 getznn.m
字号:
% This function takes the input data set of each
% z data column and arrange it to get
% all the z fault data
% input file : z file
% output file : output
% start parameter is to reduce the repetition of data
function getznn(ifn,ofn,start,stop)
% Appending input
ifn='Zb5050_01.out';%ifn='Z199_01.out';
ofn='Wb5050_01.out';%ofn='199_01.out';
start=1;
stop=0;
[FID,MSG]=fopen(ifn,'rt');
input=fscanf(FID,'%f');
fclose(FID);
inpCol=20;
A=[];
for i=1:(length(input)-inpCol+1),
B=input(i:i+inpCol-1);
A=[A;B'];
end
[RVB,MSG]=fopen(ofn,'at'); %open text file for appending
[RA,CA]=size(A);
if stop==0
finish=RA;
else
finish=stop;
end
for j=start:finish
fprintf(RVB,'%12.5f ',A(j,:));
fprintf(RVB,'\n');
end
fclose(RVB);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -