필터 지우기
필터 지우기

How can I use ''Rect'' function in matlab?

조회 수: 17 (최근 30일)
Madhavareddy kota
Madhavareddy kota 2013년 5월 7일
댓글: Tilkesh 2022년 3월 28일
Hello,
I have an equation like
sr(τ)=conj{rect(τt/Tp)*exp(j2πfc(−τt+Tp/2)+jπK(−τt+Tp/2)^2)}
and I wanna use above equation to get required result.But I couldn't use ''rect'' function in matlab, when ever I try it gives me an error like :not define function ''rect'' double.Can any one suggest how to figure it out.I have all required data except Rect function.
tp=pulse rate;
tt=time interval;
fc=centre frequency;
k=chirp rate(B.W/tp);
please help me. Thanking you.
  댓글 수: 1
Tilkesh
Tilkesh 2022년 3월 28일
function y = rect(x, D)
% function y = rect(x, D)
if nargin == 1, D = 1;
x = abs(x);
y = double(x<D/2);
y(x == D/2) = 0.5;
end

댓글을 달려면 로그인하십시오.

채택된 답변

David Sanchez
David Sanchez 2013년 5월 7일
You need to define that rect function of yours. Write a rect.m file similiar to this
function output = rect(input)
% your code here
% what do you want "rect" to do with the input?
save that rect.m file in your working workspace.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by