1 / 5

Project 1

Project 1. Chapter 1. Read this carefully!. Submit paper copy only. 33 points for each question. This project could be long if you are not very familiar with Matlab! Start as early as possible. This is an individual project. Don’t copy each other’s work.

zody
Télécharger la présentation

Project 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project 1 Chapter 1

  2. Read this carefully! • Submit paper copy only. 33 points for each question. • This project could be long if you are not very familiar with Matlab! Start as early as possible. • This is an individual project. Don’t copy each other’s work. • Do NOT turn in your Matlab code! • Use the discussion group, if necessary, to share ideas. • Plots which do not have legend, title, or labels will not receive grades. You MUST also make sure your LAST NAME is clearly shown on the title of EACH Matlab plot, otherwise you will not receive a grade for that plot! • You MUST have your name on each page of your homework. • Use multiple plots per page to avoid wasting paper. • You must have a header sheet for your homework. Include your name, class name, data, and project number. • Make sure you staple everything together before handing in your assignment. • The third QUIZ will be Matlab-based. Make sure you understand what you are doing in this assignment.

  3. Unit Impulse Function • Using the definition of unit impulse function show d(t) for difference values of a =[2,1,0.5, 0.1]. Your plot should look like the following. Make sure your plot has proper legends, title, x and y-axis labels.

  4. Using the sample code provided, plot the following: Show the following signal for when frequency is 100, 1000, 2000 Hz. You must show exactly three periods of the signal. Use SUBPLOTs. Use the first three subplots to plot each individual signal separately. Use the last subplot to show all the signals together. Using the SOUND command play the signal for the given frequency values and clearly explain the difference. Using WAVWRITE command save each signal (sound) in WAV format: 100f.wav, 1000f.wav, etc. and play each file in Windows Media Player. Set the Media Player to Visualizations  Scope. Explain your observations. Consider the following signal with T=0.001 sec.: On the first subplot, plot the signal for exactly three periods. Explain what happens when the phase reaches half of period in radian/s. On the second subplot plot two graphs one for phase=0, the other one for phase being half of period in radian/s. – your plot should only have two subplots. Listen to the sound of the signal. Explain what you hear as the phase changes. Use mathematical expressions to explain what is happening. delete('mywave.wav') Amplitude =5' Length = 10; Frequency = 500; Phase=0; x = -Length*pi:0.01:Length*pi; t = 0:0.0001:400/(2*pi*Frequency); G0=sin(Frequency*x+Phase); G1=Amplitude*sin(2*pi*Frequency*t-Phase); sound(G1); wavwrite(G1,'mywave.wav') subplot(2,2,1:2) plot(t,G1,'r'); title('Plot of the Signal','FontSize',12) xlabel('Time') ylabel('Sine Tone') B- Signals and Sounds

  5. Using the code provided, define a Unit Step Function, u(t), - assume the function is 0 just before time reaches zero. Call this function UnitStepFunction.m Consider x(t)=2t^2. and find y(t)=x(t).u(t). Plot both x(t) and y(t) on the same graph. Assume time is changing from -20 to 20. Assume x(t)=2t^2. and find y(t)=x(t).u(t-4). Plot both x(t) and y(t) on the same graph. Assume time is changing from -20 to 20. Your plot should look something like below. Plot f(t) Creating a function %let's define a function %create this file and call it myfunction.m function output = myfunction(argument); if argument > 0 output1 = 1; else output1 = 0; end output=output1; For loop %%%%Define you time range time=-10:0.1:10; lenghtofw=length(time); %%%%%Define Your Function Here: YourTestFunction=time.^2; %------------------------- %%% Plotting your function and the step unit function for i = 1:length(time) k(i)=YourTestFunction(i)*myfunction(time(i)+3); end plot(time,YourTestFunction, '--b', time,k,'r*', 'MarkerSize',18); legend('The Test Function','Output Function') C-Unit Step Function

More Related