MATLAB EXAMPLES 1 / HABERLESME TEMELLERİ
Draw periodic signal matlab codes ;
clear all
close all
clc
t = -2:0.005:2; %time vector
A1=10;%amplitude
x1 = A1*cos(5*pi*t); % 1st periodic signal
plot(t,x1,'r-','linewidth',2);
legend('x1=10cos(5*pi*t)')
grid on
% A = 2; % Define the amplitude
% w = pi; % Define the frequency in Hertz
% theta = pi/6; % Define phase shift
% t = -1:0.01:5; % Define the time vector
% x = A * sin(w * t + theta); % Compute y(t), the sine wave
% plot(t,x) % Plot y vs. t
% xlabel('t (seconds)') % Label x-axis
% ylabel('x(t)') % Label y-axis
% % Give plot a title
% title('EE341.01 Example 2: Plot of x(t) = 2*sin(pi*t+pi/6)')
% grid
Yorumlar
Yorum Gönder