Script2 - p ffft = figure('Position', [-1000 300 512 384]);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
close all; clear all; clc; scrsz = get(0, 'ScreenSize'); s dMinTime = -1; dMaxTime = 3; dSamplingRate = 100; d [treal] = GenerateTimePoints(dMinTime, dMaxTime, 0.00001); [ dResolution = 2*pi / dSamplingRate; [t] = GenerateTimePoints(dMinTime, dMaxTime, dResolution); [ dW = 20; v = 2*cos(dW*t); v vreal = 2*cos(dW*treal); v V = fftshift(fft(v)); dw = ((1:length(V))-1-0.5*(length(V)-1))/sqrt(pi); d fgraph = figure('Position', [-1000 300 512 384]); plot(treal, vreal), hold on, plot(t, v, 'r'), hold off;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p ffft = figure('Position', [-1000 300 512 384]); plot(dw, abs(V)); p keyboard; k for dSamplingRate = 100:-2.5:5; dResolution = 2*pi / dSamplingRate; [t] = GenerateTimePoints(dMinTime, dMaxTime, dResolution); dW = 20; v = 2*cos(dW*t); vreal = 2*cos(dW*treal); V = fftshift(fft(v)); dw = ((1:length(V))-1-0.5*(length(V)-1))/sqrt(pi); figure(fgraph); plot(treal, vreal), hold on, plot(t, v, 'r'), hold off; figure(ffft); plot(dw, abs(V)); drawnow; end...
View Full Document

This note was uploaded on 02/17/2010 for the course BIEN 130 taught by Professor Park during the Spring '10 term at UC Riverside.

Ask a homework question - tutors are online