Can someone please help me do this problem?

조회 수: 8 (최근 30일)
Rehab Mohamed`
Rehab Mohamed` 2017년 3월 15일
댓글: Star Strider 2017년 3월 17일
The sinc function is very important in digital signal processing as it is the Fourier transform of a rectangular pulse and is used extensively in interpolation. The sinc function is given by: sinc(t)= sin(π t)/(π t) when t ≠0 sinc(t)=1 when t=0 We will graph the sinc function in 3D to understand better its shape. Write a script that creates a plaid of x and y values that vary between -5 to 5. Choose an adequate step size. Calculate r which is given by: r= √(x^2+ y^2 ) Then, plot using x, y, and sinc(r) using a mesh plot. You can either write your own function for sinc or use MATLAB’s built in function. Include your code and plot below. Skills – 3D mesh plots in MATLAB, meshgrid.
  댓글 수: 1
Rehab Mohamed`
Rehab Mohamed` 2017년 3월 15일
편집: Rehab Mohamed` 2017년 3월 15일
I started with these equations, but i don't know if that's right or not x= -5:1:5; y= -5:1:5; r= sqrt(x.^2 +y.^2);

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

채택된 답변

Star Strider
Star Strider 2017년 3월 16일
You have to adapt your ‘sinc’ function to use ‘r’ rather than ‘t’, and use element-wise division. Use the meshgrid function to create the appropriate ‘X’ and ‘Y’ matrices to calculate ‘r’.
Define ‘x’ and ‘y’ as:
x= -5:0.1:5;
y= -5:0.1:5;
to get acceptable resolution in the plot.
  댓글 수: 6
Rehab Mohamed`
Rehab Mohamed` 2017년 3월 17일
Oh ok, i figured out what was wrong. thanks for your help
Star Strider
Star Strider 2017년 3월 17일
My pleasure.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by