Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to MATLAB

Similar presentations


Presentation on theme: "Introduction to MATLAB"— Presentation transcript:

1 Introduction to MATLAB
Oğuz Yetkin 9/27/2013

2 MATLAB MATrix LABoratory In development since 1984
Very mature programming language/environment/scientific computing tool Open source alternative: Octave

3 MATLAB Environment Variable Editor Working Directory Workspace
Current Folder Command Window

4 Referring to Matrix Elements
[m(1,1) m(1,2) m(1,3); m(2,1) m(2,2) m(2,3); m(3,1) m(3,2), m(3,3)]

5 DEMO

6 Extra Slides

7 FFT From “Fast Fourier Transform and
%From Wanjun Huang, FFT Example Fs = 150; % Sampling frequency t = 0:1/Fs:1; % Time vector of 1 second d f = 5; % Create a sine wave of f Hz x = sin(2*pi*t*f); nfft = 1024; % Length of FFT % Take fft, padding with zeros so that length(X) is equal to nfft X = fft(x,nfft); % FFT is symmetric, throw away second halfX = X(1:nfft/2); % Take the magnitude of fft of xmx = abs(X);% Frequency vector f = (0:nfft/2-1)*Fs/nfft; % Generate the plot, title and labels. figure(1); plot(t,x);title('Sine Wave Signal'); xlabel('Time (s)'); ylabel('Amplitude'); figure(2);plot(f,mx); title('Power Spectrum of a Sine Wave'); xlabel('Frequency (Hz)'); ylabel('Power'); From “Fast Fourier Transform and MATLAB Implementation” Wanjun Huang


Download ppt "Introduction to MATLAB"

Similar presentations


Ads by Google