필터 지우기
필터 지우기

horizontal translation distorts the plot

조회 수: 1 (최근 30일)
Malgorzata Florek
Malgorzata Florek 2013년 12월 15일
I'm tryin to plot and fit the following function:
function ret = pd(aqq, center, FreqVec);
%p1: -aqq/2<f<aqq
FreqVec1 = FreqVec(find(((FreqVec-center) <= -0.5*aqq)));
p11=zeros(1,length(FreqVec1));
FreqVec2 = FreqVec(find(((FreqVec-center) < aqq) & ((FreqVec-center) > -0.5*aqq)));
p12=((0.5*aqq+(FreqVec2-center)).^(-0.5));
FreqVec3 = FreqVec(find(((FreqVec-center) > aqq)));
p13=zeros(1,length(FreqVec3));
p1=[p11 p12 p13];
%p2: -aqq>f>aqq/2
FreqVec1 = FreqVec(find(((FreqVec-center) <= -aqq)));
p21=zeros(1,length(FreqVec1));
FreqVec2 = FreqVec(find(((FreqVec-center) < 0.5*aqq) & ((FreqVec-center) > -aqq)));
p22=((0.5*aqq-(FreqVec2-center)).^(-0.5));
FreqVec3 = FreqVec(find(((FreqVec-center) >= 0.5*aqq)));
p23=zeros(1,length(FreqVec3));
p2=[p21 p22 p23];
ret= p1+p2;
end
It should be a symmetrical doublet with peaks separated by aqq, but when I allow the horizontal transition (ie. set the parameter center different than zero) the plot gets distorted: one of the peaks gets bigger, the other one gets smaller. How should I redefine this function to have a possibility to shift it along the x axis wihout losing the symmetrical shape of spectrum?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by