이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
채택된 답변
C.J. Harris
2013년 3월 22일
편집: C.J. Harris
2013년 3월 22일
0 개 추천
It means sfdr will take on the maximum value contained in the array ptot between element number nper+4 and element number N/2.
If you want a better answer you really have to add more detail to your question.
댓글 수: 5
lotus
2013년 3월 22일
thank you for answering.i dont actually understand the meaning of "nper".can you explain it in the simplest way?
nper will be an integer number, that's all I can tell, when added to the number 4 will result in an array reference, for example:
nper = 2;
ptot = [9 8 7 6 5 4 3 2 1];
nOut = ptot(nper+4)
nOut =
4
so,if let say the example is like below:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Example 4.11 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% Pipeline Converter %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all;
%-------------------------------------------------------------------------%
% DAC Static parameters %
%-------------------------------------------------------------------------%
%-------------------------------- Stage 1 --------------------------------%
V_DAC_L1=-0.5;
V_DAC_H1=0.5;
GAIN1=2.0;
VthL1=-0.25+eps;
VthH1=0.25+eps;
%-------------------------------- Stage 2 --------------------------------%
V_DAC_L2=-0.5;
V_DAC_H2=0.5;
GAIN2=2.0;
VthL2=-0.25+eps;
VthH2=0.25+eps;
%------------------------------- Stages 3-9 ------------------------------%
V_DAC_L3=-0.5;
V_DAC_H3=0.5;
GAIN3=2.0;
VthL3=-0.25+eps;
VthH3=0.25+eps;
Vth10=0;
%-------------------------------------------------------------------------%
% Dynamic parameters %
%-------------------------------------------------------------------------%
%-------------------------------- S&H Block-------------------------------%
srH=250e6;
f_TH=600e6;
betaH=1;
tauH=1/(2*pi*betaH*f_TH);
gainH=1;
%-------------------------------- Stage 1 --------------------------------%
sr1=10000e8;
f_T1=6000e6;
beta1=1/2;
tau1=1/(2*pi*beta1*f_T1);
gain1=1;
%-------------------------------- Stage 2 --------------------------------%
sr2=20000e8;
f_T2=6000e6;
beta2=1/2;
tau2=1/(2*pi*beta2*f_T2);
gain2=1;
%------------------------------- Stages 3-9 ------------------------------%
sr=25000e8;
f_T=6000e6;
beta=1/2;
tau=1/(2*pi*beta*f_T);
gain=1;
%-------------------------------------------------------------------------%
% Simulation parameters %
%-------------------------------------------------------------------------%
Ts=1e-8;
Tmax=Ts/2;
Vfs=2;
N=2^12;
Ntransient=20;
Tstop=Ts*(N+Ntransient);
nper=73;
Fs=1/Ts;
Fin=nper*Fs/N; % Input signal frequency (Fin = nper*Fs/N)
f=Fin/Fs; % Normalized signal frequency
bw=Fs/2;
Amp_dB=-0; % Amplitude in dB
Ampl=10^(Amp_dB/20)*Vfs/2; % Input signal amplitude
finrad=Fin*2*pi;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Launch Simulation %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
options=simset('InitialStep', 1, 'RelTol', 1e-3, 'MaxStep', 1,...
'Fixedstep', 1);
sim('Ex4_11',Tstop, options); %Starts Simulink simulation
%-------------------------------------------------------------------------%
% Graphic Outputs %
%-------------------------------------------------------------------------%
w=hann(N);
f=Fin/Fs; % Normalized signal frequency
fB=N*(bw/Fs); % Base-band frequency bins
yfft=y(1+Ntransient:N+Ntransient);
[snr,ptot]=calcSNR(yfft',f,fB,w',N);
ptot=ptot-max(ptot); % Normalize total spectrum
figure(1);
clf;
plot(linspace(0,Fs/2,N/2), ptot(1:N/2), 'r');
grid on;
title('PSD of the Output')
xlabel('Frequency [Hz]')
ylabel('PSD [dB]')
axis([0 Fs/2 -140 0]);
sfdr=max(ptot(nper+4:N/2))
snr
i got the answer sfdr=-74.2306. but supposedly, the answer should be 70.9..can you tell me which part that i should do the correction.this is the main file
C.J. Harris
2013년 3월 22일
편집: C.J. Harris
2013년 3월 22일
My guess is that the values in the array ptot are not what you expect. In your example above you are taking the maximum value in the array ptot between element 77 and 2048. In your case that maximum value is -74.2306, there is nothing you can do to 'correct' this, apart from changing the values in the array ptot.
lotus
2013년 3월 22일
thank you.i'll try my best.your explanation made me understand better about "nper"
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
