Write a function to calculate the normalized sinc
This example demonstrates writing test cases for function-based problems. Assessment tests are designed to capture the problem requirements as well as common student errors.
The rectangular function (or square-pulse) is commonly used in signal processing applications. The Fourier transform of the rectangular function is the normalized sinc function given by:

Write a function normsinc that returns
. Your function
must:
for each element
of the input. If the input is a 1-by-4 vector, the output is also a
1-by-4.
as
.Two sample inputs are provided for you to test your code.
function y = normsinc(x)
% Implement the normalized sinc function
%code goes here
end
% Test your function before submitting
y1 = normsinc(1)
y2 = normsinc([-1 0 1/2 3/2])
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
y1 = normsinc(1)
y2 = normsinc([-1 0 1/2 3/2])
function y=normsinc(X)
y=[];
for x=X
if(x==0)
y=[y 1];
else
y=[y sin(pi*x)/(pi*x)];
end
end
end

Write a function to calculate the normalized sinc This example demonstrates writing test cases for function-based...
Write the time domain function z(t) of the graph below as the sum of two rectangular pulse functions, then compute the fourier transform X(w) in terms of sinc function. (Reminder: A rectangular pulse centered fo.lt21 at the origin with width 27 is defined as II(t) = 11.-T <t< + and it has the fourier transform II(t) sinc(wr)) 3 2 Amplitude 0 0 1 2 3 4 5 6 7 8 9 10 11 Time
Write the time domain function r(t) of the graph below as the sum of two rectangular pulse functions, then compute the fourier transform X(w) in terms of sinc function. (Reminder: A rectangular pulse centered 50,427 at the origin with width 27 is defined as II(t) = 11, -T<t<+T and it has the fourier transform II(t) sincwr)) 1 0 Amplitude -1 -2 0 2 3 8 9 10 11 5 6 7 Time-
Hello, I'm taking signal systems course. please solve this
question in matlab as soon as possbile please.
Question 1 a) Write a function that calculates the Continuous Time Fourier Transform of a periodic signal x() Syntax: [w, X] = CTFT(t, x) The outputs to the function are: w = the frequencies in rad/s, and X = the continuous Fourier transform of the signal The inputs to the function are: x-one period of the signal x(t), andt the time vector The...
The problem demonstrates the use of the random number generator to recover previously generated random numbers Write a function called randi test that takes two scalar positive integer arguments maxi and n, and retums two output arguments: a row vector of n2 elements and and n-by-n matrix. The two output arguments must contain the exact same set of random integers that fall between 1 and maxi Do this using the random number genertor, not by reshaping the data Example n,v-randi...
please code on MATHLAB and show graph thank you in advance!
Generate the following function y1(t)=2* sin (2*pi* 1 *t)+4*sin(2*pi*2*t)+3*sin(2*pi*4*t) y2(t)=2*cos(2*pi*1*t)+4*cos(2*pi*2*t)+3*cos(2*pi*4*t) First, required by sampling theorem, the step size of t (delta t) has to be smaller than a value. Figure out this value and set the delta t at least 3 times smaller than this value and calculated y1(t) and y2(t). Increase the step size (delta t) and recalculate y1(t) and y2(t). See the difference. Calculate Fourier Transform of...
1. in Matlab, write a user-defined function, with two input (r,theta) , θ expressed in degrees) and two output arguments (X,Y). The inputs are a location on a polar coordinates corresponding to Cartesian plane expressed in rectangular coordinates. The picture below describes the problem. X, Y rcos θ Some formula that you may need: x = r * cos (theta * pi/180); y r * sin(theta * pi/180); Test your code for r=7, theta=55° and present your results.
C++
code please asap
QUESTIONS Write the test main function as described next. This function is NOT a member function of either of the two classes above. It is located in separate source file. Create an array of type Flight and size 10 1. Prompt the user to enter values for speed, name, and id for all 10 objects. You must use the overloaded input stream operator of class Flight. 1. Write the value of the name variable of all...
Steps: Write a program that upon getting mass value from user, converts it to energy using Einstein’s mass-to-energy conversion equation. You must write a function to calculate energy. Writing the whole thing in main will not get any credit. Note: Conversion equation=> e = m x c^2 Please do these steps: 1-Draw flowchart diagram or write the pseudocode 2-Write your code 3-Run the code 4-Test for all possible inputs!
This basic problem demonstrates the while-loop. (USE
MATLAB)
Write a Matlab function called steps that takes one scalar as an
input argument and returns two scalars as output arguments. If it
is called this way [n, d_left] = steps(d), then it sets n equal to
the minimum number of steps required to move from a distance of one
foot away from a wall to a distance less than d feet from the wall.
The first step is 1/2 foot. If...