필터 지우기
필터 지우기

please how to write this in matlab?

조회 수: 1 (최근 30일)
Abdelrazzak rifai
Abdelrazzak rifai 2018년 4월 16일
댓글: Abdelrazzak rifai 2018년 4월 16일
fourier function
  • define a sum of cosine waves f=8 HZ
  • build it's plot in time domain
  • build the plot of it's magnitude spectrumi don't understand how to use the arry in matlab :( :(

답변 (2개)

Ngoc Thanh Hung Bui
Ngoc Thanh Hung Bui 2018년 4월 16일
I dont really understand the problem, better more specifically

KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 4월 16일
편집: KALYAN ACHARJYA 2018년 4월 16일
 % Are you looking for this one 
t=0:1:115;
fs=500 % Assumed Sampling Frequency
f=8; % Given 8 Hz
cw=cos(2*pi*f/fs*t);
subplot(121);stem(cw,'r'); title('Time Domain');
%Read in Signal Processing Book How to find Magnitute Response
fftLength=512;
sigLength=length(cw);
win=rectwin(sigLength)'; % Window Selection 'Ractangular'
y=fft(cw.*win,fftLength);
length=fftLength/2+1;
% Magnitude Response 
subplot(122);plot([1:length]*fs/(2*length),abs(y(1:length)));
title('Magnitude Response');
  댓글 수: 2
Abdelrazzak rifai
Abdelrazzak rifai 2018년 4월 16일
the professor gave us :
#s=fft(U);
build plot of complex spectrum
1:M=√a^2+b^2
2:MS=abs(S)
3: plot(ms)
4:he gave us:complex exponential and Fourier function and he told us using vector and bla bla bla..
Abdelrazzak rifai
Abdelrazzak rifai 2018년 4월 16일
x(t)=A*cos(2*pi*frequency*time+pi/6)
  • pi/6=30 phase shift of the cosine in degree
  • A=1,frequency=8,phase=pi/6; or 30 degree,time=0:1:115;(but how can i understand these step?please..so how can i build the magnitude spectrum?i want to understand please..

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by