为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

matlabfft简单例子(matlabfft简单例子)

2017-10-23 13页 doc 31KB 37阅读

用户头像

is_496339

暂无简介

举报
matlabfft简单例子(matlabfft简单例子)matlabfft简单例子(matlabfft简单例子) matlabfft简单例子(matlabfft简单例子) N=128; N=0:N-1; T=n/fs; F0=10;% sets sine signal frequency % generates sinusoidal signals X=sin (2*pi*f0*t); Figure (1); Subplot (231); Plot (T, x)% sinusoidal waveform in time domain Xlabel ('t');...
matlabfft简单例子(matlabfft简单例子)
matlabfft简单例子(matlabfft简单例子) matlabfft简单例子(matlabfft简单例子) N=128; N=0:N-1; T=n/fs; F0=10;% sets sine signal frequency % generates sinusoidal signals X=sin (2*pi*f0*t); Figure (1); Subplot (231); Plot (T, x)% sinusoidal waveform in time domain Xlabel ('t'); Ylabel ('y'); Title (` sine signal, y=2*pi*10t time domain waveform '); Grid; % to do FFT transform and do frequency spectrum Y=fft (x, N);% performs the FFT transform Mag=abs (y);% for magnitude F= (0:length (y) -1)'*fs/length (y);% corresponding frequency conversion Figure (1); Subplot (232); Plot (F, MAG):% do spectrogram Axis ([0100,0,80]); Xlabel (` frequency (Hz) '); Ylabel ('amplitude'); Title (sine signal y=2*pi*10t amplitude spectrum N=128'); Grid; MATLAB's FFT program 2009-11-08 16:30clc X% input signal M=nextpow2 (x);% x length corresponds to the minimum power m of 2 N=2^M; If length (x) x (i), (j). temp = x (i); x = x (i), (j); x (j) = temp; end end end y = x; 以上为按照升序排列的, 若要降序, 则 if x < x (i), (j). temp = x (i); x = x (i), (j); x (j) = temp; 冒泡% the clc; clear; x = rand (1,10); for i = 1: length (x) for j = 1: length (x) - (i) if (x > x (j), (j + 1)) t = x (j); x (j) = x (j + 1); x (j + 1) = t; end end end disp (x) 图自己画 core = [1 2 3 5 7 9 13 14 15] n = _ core core n = length (core) n (1) = _ core 将第一个元素移除% [] _ core (n) = n (n)% 最后一元素与mag最后一元素相同 core _ = n _ del core core core 求二者之差%
/
本文档为【matlabfft简单例子(matlabfft简单例子)】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索