📄 nqphi.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]=nqphi(z,n)
x=z(:,1);
y=abs(z(:,2));
q_sec=128;
phi_sec=256;
n_q_phi(1:phi_sec,1:q_sec)=0;
data_length=length(x);
q_max=max(abs(y));
%q_max=2000;
q_interval=q_max/q_sec;
phi_interval=360/phi_sec;
for(i=1:data_length)
index_y=fix(x(i)/phi_interval)+1;
index_x=fix(abs(y(i))/q_interval);
if index_x~=0 & index_x<=q_sec
n_q_phi(index_y,index_x)= n_q_phi(index_y,index_x)+1;
end
end
zsum=n_q_phi;
z1=n_q_phi(1:phi_sec/2,:);
z2=n_q_phi(phi_sec/2+1:phi_sec,:);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -