Sampling of a sinusoidal signal.

조회 수: 9 (최근 30일)
Uma sri Vidyadhari
Uma sri Vidyadhari 2020년 8월 5일
답변: Image Analyst 2020년 8월 6일
Hi, I want to write undersampling over and perfect samplings to a sinusoidal signal of frequency 200Khz. I tried but couldnt convert continuous to discrete. Can someone help me with the code?

채택된 답변

Image Analyst
Image Analyst 2020년 8월 6일
Here's a start:
clc; % Clear the command window.
fprintf('Beginning to run %s.m.\n', mfilename);
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 18;
period = 1/200000;
numSamples = 2000; % Well oversampled!
t = linspace(0, 5*period, numSamples); % Time covers 5 periods
amplitude = 7;
y = amplitude * sin(2 * pi * t / period);
plot(t, y, 'b-', 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', fontSize);
ylabel('y', 'FontSize', fontSize);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Attributes and Indexing에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by