Homework 1 (a).m - z = round(abs(255(sin(x.^2 y.^2 figure...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
%Abdelhamid jnane %Homework # 1 clear all close all % exercise # 1 % figure #1 x = 0:0.01:2; y = 2*sin(2*pi*2*x); subplot(2,2,1) plot(x,y) xlabel('time') title('signal 2Hz sin') %figure # 2 x = 0:0.2:2 y = 2*sin(2*pi*2*x); subplot(2,2,2) stem(x,y) xlabel('time') title('samples signal') % figure # 3 x = 0:0.01:2; y = round(2*sin(2*pi*2*x)); subplot(2,2,3) plot(x,y) xlabel('time') title('signal discretized') %figure#4 x = 0:0.01:2; y = 2*sin(2*pi*2*x); subplot(2,2,4) plot(x,y,'g') xlabel('time') title('sampled and discretized signal') hold on x1 = 0:0.2:2; y1 = 2*sin(2*pi*2*x1); stem(x1,y1) hold off %exercise # 2 % figure # 1 clear all; [x y] = meshgrid(0:.01:8*pi);
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: z = round(abs(255*(sin(x.^2+y.^2)))); figure; imagesc(z) axis off %figure # 5 % signal with 1000 Hz sampling rate t=0:0.001:1 y=2*sin(2*pi*4*t); figure; subplot(2,2,1); plot(t,y); title('signal with 1000 Hz sample'); % with 100Hz sampling rate t=0:0.01:1 y=2*sin(2*pi*4*t); subplot(2,2,2); plot(t,y);title('signal with 100 Hz sample') % with 10Hz sampling rate t=0:0.1:1 y=2*sin(2*pi*4*t); subplot(2,2,3); plot(t,y);title('signal with 10 Hz sample') %signal with 5 Hz t=0:0.2:1 y=2*sin(2*pi*4*t); subplot(2,2,3); plot(t,y);title('signal with 10 Hz sample')...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern