NET 222: Communications And Networks Fundamentals Name: Homework 2- MATLAB ID: Section: Networks and communications Department Question 1: Write the MATLAB statements for the following requirements: 1- Declare and add the following matrices: A = [1 2 3 ; 7 8 9 ; 6 5 4] 0.25 B = [2 1 1 ; -4 22 -12 ; 2 8 9] 0.25 C = A + B 0.25 2- Find the complement of B. B' Define a vector of angels that start from 0 until 1 with a step of 0.3 between each two angels. Then get the COSINE for these angels. V = 0 : 0.3 : 1 S = cos(V) Question 2: 1- Plot the function e-x/3sin(x) spaced over 0≤x≤4π .use 100 samples. x=linspace(0,4*pi,100); y=sin(x); y1=exp(-x/3); y2=y.*y1; plot(x,y2) or plot(y2) Note: use * Erorr (y2=y*y1;) 2- Create the following graph light intensity plot : a) Creating vector x,y for plotting the theoretical curve. x=[10:0.1:22];y=95000./x.^2; b) Creating a vector with light intensity from data. xd=[10:2:22];yd=[950 640 460 340 250 180 140]; Question 3: 1. Sample the sinusoid x = sin(2 pi f t), where f = 2 kHz. And t=0:5T • Let x1 be the signal sampled at 10 kHz. • Let x2 be the signal sampled at 3 kHz Question 4: 1. Plot each function showing below on x=[0,7 pi] incremented by 0.1. Produce three plot on the same figure and different colors: • 3 * sin(x) ) • 0.75 * cos (x) • x+sin(3pi/4 *x) Note: Bonus one mark for those who will solve the homework correctly
© Copyright 2025 Paperzz