how to make frequency shifting on simulink

10 visualizaciones (últimos 30 días)
mohamed  al-asklany
mohamed al-asklany el 2 de Mzo. de 2014
Respondida: Veera el 8 de Nov. de 2023
if i have two sin waves block on simulink the first with variable frequency assume 10:30 hz and the second with fixed frequency f1 how to make the first with 10+f1:30+f1 i used frequency offset but it shift signal with f1 not center signal example sin(3t)*sin(4t)=a*cos(7t)+a*cos(t) i want only cos(7t) without filtering thanks

Respuestas (2)

Veera
Veera el 8 de Nov. de 2023
clc
clear all
close all
syms t w a
% Define the input signals
x1 = exp(-t) * heaviside(t);
x2 = dirac(t);
% Compute and display Fourier transforms
X1 = fourier(x1, w);
X2 = fourier(x2, w);
disp("Fourier transform of signal 1:")
pretty(X1)
disp("Fourier transform of signal 2:")
pretty(X2)
% Sum of Fourier transforms
X_sum = X1 + X2;
disp("Sum of Fourier transforms of signal 1 and signal 2:")
pretty(X_sum)
% Define frequency-shifted signals
x_left_shift = exp(-t) * heaviside(t) * exp(-a*t);
x_right_shift = exp(-t) * heaviside(t) * exp(a*t);
% Compute and display Fourier transforms of frequency-shifted signals
X_left_shift = fourier(x_left_shift, w);
X_right_shift = fourier(x_right_shift, w);
disp("Fourier Transform of frequency shift left signal is:")
pretty(X_left_shift)
disp("Fourier Transform of frequency shift right signal is:")
pretty(X_right_shift)

Veera
Veera el 8 de Nov. de 2023
clc
clear all
close all
syms t w a
% Define the input signals
x1 = exp(-t) * heaviside(t);
x2 = dirac(t);
% Compute and display Fourier transforms
X1 = fourier(x1, w);
X2 = fourier(x2, w);
disp("Fourier transform of signal 1:")
pretty(X1)
disp("Fourier transform of signal 2:")
pretty(X2)
% Sum of Fourier transforms
X_sum = X1 + X2;
disp("Sum of Fourier transforms of signal 1 and signal 2:")
pretty(X_sum)
% Define frequency-shifted signals
x_left_shift = exp(-t) * heaviside(t) * exp(-a*t);
x_right_shift = exp(-t) * heaviside(t) * exp(a*t);
% Compute and display Fourier transforms of frequency-shifted signals
X_left_shift = fourier(x_left_shift, w);
X_right_shift = fourier(x_right_shift, w);
disp("Fourier Transform of frequency shift left signal is:")
pretty(X_left_shift)
disp("Fourier Transform of frequency shift right signal is:")
pretty(X_right_shift)

Community Treasure Hunt

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

Start Hunting!

Translated by