📄 nqphan.m
字号:
%This program is designed to transform original PD data to
%two half cycle PD n-q-phan spectrum.
%z is original PD data come from PD data file;
%n is an array with two elements, of which the first is PD amplitude
% windows number and the second is phase windows number.
function [zsum,z1,z2]=nqphan(z,n)
x=z(:,1);
y=z(:,2);
q_sec=128;
phan_sec=256;
n_q_phan(1:q_sec,1:phan_sec)=0;
data_length=length(x);
%q_max=max(abs(y));
q_max=1000;
q_interval=q_max/q_sec;
phan_interval=60000/phan_sec;
for(i=1:data_length)
index_y=fix(x(i)/phan_interval)+1;
index_x=fix(abs(y(i))/q_interval);
n_q_phan(index_x,index_y)= n_q_phan(index_x,index_y)+1;
end
zsum=n_q_phan;
z1=n_q_phan(:,1:phan_sec/2);
z2=n_q_phan(:,phan_sec/2+1:phan_sec);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -