Question

In: Computer Science

In Matlab please part b and c 1. Generate a 1000 Hz sinusoid time sequence for...

In Matlab please part b and c

1. Generate a 1000 Hz sinusoid time sequence for 6 cycles with sampling frequency 20 kHz. Note: A sine wave with frequency fc is given by sin(2πfct). (a) Use the ‘plot’ command to display the result. (b) How many samples are present in one period of the sine wave? (c) What is the total length of the time and amplitude vectors here?

I got part a:

  1. close all;

clear all;

clc;

f_s= 16000;

f=1000;

cycleCount =4;

time = 0: 1/f_s : cycleCount*(1/f);

signlA = sin(2*pi*f*time);

figure (1);

plot(time,signlA);

title ('Task 1');

xlabel ('Time Vector');

ylabel ('amplitude');

Solutions

Expert Solution

Solution for the problem is provided below:

Note: Your given answer of part a has some value errors, it is not according to the question given, I corrected it according to the question, if the correction is not needed, just use the original code, but it is not the part a answer.

Changes made:

F_s = 20000, you gave it as 16000

Cycle count = 6, you gave it as 4

The updated code and part b and part c are included in the below code:

close all;

clear all;

clc;

f_s= 16000;

f=1000;

cycleCount =6;

time = 0: 1/f_s : cycleCount*(1/f);

signlA = sin(2*pi*f*time);

figure (1);

plot(time,signlA);

title ('Task 1');

xlabel ('Timea Vector');

ylabel ('amplitude');

%%%part b

%samples in one period of wave

NumberofSamplesPerPeriod=length(time)/cycleCount

%%%part c

%total length of time vector

Total_length_of_time_vector=length(time)

%total length of amplitude vector

Total_length_of_amplitude_vector=length(signlA)

Output:


Related Solutions

2. Please use Matlab to generate two sine waves of 100 Hz and 10 Hz frequencies,...
2. Please use Matlab to generate two sine waves of 100 Hz and 10 Hz frequencies, respectively. Both sine waves will have a peak value of 1 (peak to peak value of 2). The sampling rate is 1000 Hz (fs = 1000 Hz) and the total data point is 1000 points for each wave. Combine the two sine waves into one. Plot the combined waveform (1 point). Then, perform fft on the combined waveform. Plot the frequency amplitude spectrum from...
Please solve parts B and C Part A What is the average time required for H2...
Please solve parts B and C Part A What is the average time required for H2 to travel 1.00 m at 298 K and 1 atm? Express your answer with the appropriate units. t = 5.66×10−4 s Correct Part B How much longer does it take N2 to travel 1.00 m, on average, relative to H2 under these same conditions? Express your answer with the appropriate units. t = 3.73s SubmitMy AnswersGive Up Incorrect; Try Again; 3 attempts remaining Part...
Part 1: answer (a), (b), (c), and (d). Part 2: answer (a), (b), (c), and (d)....
Part 1: answer (a), (b), (c), and (d). Part 2: answer (a), (b), (c), and (d). Godspeed, and good luck!!! CC11 Cookie Creations Natalie and her friend Curtis Lesperance decide that they can benefit from joining Cookie Creations and Curtis’s coffee shop. In the first part of this problem, they come to you with questions about setting up a corporation for their new business. In the second part of the problem, they want your help in preparing financial information following...
Original C code please. Part 1: You can do A, B, and C in one program...
Original C code please. Part 1: You can do A, B, and C in one program with multiple loops (not nested) or each one in a small program, it doesn’t matter. A. Create a loop that will output all the positive multiples of 9 that are less than 99. 9 18 27 36 45        …. B. Create a loop that will output all the positive numbers less than 200 that are evenly divisible by both 2 and 7. 14        28       ...
I HAVE ALREADY CORRECTLY COMPLETED PART A AND B PLEASE COMPLETE PART C ONLY Part A...
I HAVE ALREADY CORRECTLY COMPLETED PART A AND B PLEASE COMPLETE PART C ONLY Part A In late 2020, the Nicklaus Corporation was formed. The corporate charter authorizes the issuance of 6,000,000 shares of common stock carrying a $1 par value, and 2,000,000 shares of $5 par value, noncumulative, nonparticipating preferred stock. On January 2, 2021, 4,000,000 shares of the common stock are issued in exchange for cash at an average price of $10 per share. Also on January 2,...
Exercise 3 Part 1. Solving a system Ax = b **Create a function in MATLAB that...
Exercise 3 Part 1. Solving a system Ax = b **Create a function in MATLAB that begins with: function [C,N]=solvesys(A) [~,n]=size(A); b=fix(10*rand(n,1)) format long We are using format long to display a number in exponent format with 15 digit mantissas. If later on, you will need to switch back to the default format, type and run format The input is an matrix A. If A is invertible, the outputs are the matrix C, whose 3 columns x1, x2, x3 are...
1. Generate a sine wave with frequency 100 Hz. a. Sample the signal with a sampling...
1. Generate a sine wave with frequency 100 Hz. a. Sample the signal with a sampling frequency (i) 1000 Hz and (ii) 1050 Hz. b. For each frequency in Question 1(a), perform DFT for ONE (1) cycle and ONE and a HALF (1.5) cycles of the waveform. Comment on your observation.
Please use C++ 1. A Sequence of numbers and a sum is given as input. List...
Please use C++ 1. A Sequence of numbers and a sum is given as input. List all combinations of numbers that can add upto the given Sum. User input:- Enter numbers: -   1, 3,7,9,11 Enter a sum :- 20 Output: 11+9 = 20 1+3+7+9 = 20 2. Print absolute prime numbers between a given range:- Enter Range - 2,99 For eg Prime numbers are:- Prime numbers ==> 2,3,5,7,11,13,17,19,23 Absolute Prime numbers ==> 2,3,5,7,11,23 3. Write an encoder and decoder program,...
1.The concentration of the diluted solution determined in part b and in part c must be...
1.The concentration of the diluted solution determined in part b and in part c must be equal. how do the values obtained compare? explain part b: preparation of a dilution solution standard solution volume used: 10.00 mL final volume of the solution: 25.00 mL concentration of the standard solution: 0.800 mol/L part c: experimental determination of the concentration of the diluted solution dough test tube with residue: 46.19g dough test tube empty: 47.42g volumen of solution used: 3.00mL or 0.003L...
Use and provide Matlab for the following: Generate the discrete-time signal x[n] = 4 cos (2pi....
Use and provide Matlab for the following: Generate the discrete-time signal x[n] = 4 cos (2pi. 10. nT5) + 2cos(2pi. 100. nT5) + 3cos(2pi 200. nT's), with Ts0.001 sec. Display the signal in both time and frequency-domain. Assume that the 100 Hz component of x [n] is your desired signal while the other two components are noise. Design a suitable filter to extract the desired (i.e. 100 Hz) signal. Display the filter's response. Display the output signal in the frequency-domain....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT