资源简介
MATLAB2017a的中文文档,之前因为上传权限问题分开为三个文件,现在权限够了合成一个文件
代码片段和文件信息
function fftgui(x)
%FFTGUI Demonstration of Finite Fourier Transform.
% FFTGUI(x) plots real(x) imag(x) real(fft(x)) and imag(fft(x)).
% FFTGUI without any arguments uses x = zeros(132).
% When any point is moved with the mouse the other plots respond.
%
% Inspired by Java applet by Dave Hale Stanford Exploration Project
% http://sepwww.stanford.edu/oldsep/hale/FftLab.html
if nargin == 0
% Default initial x is all zeros.
x = zeros(132);
end
if ~isempty(x)
if isequal(x‘reset‘)
% Restore original data
x = get(0‘userdata‘);
set(gcf‘userdata‘x);
set(findobj(‘tag‘‘fftguirc‘)‘string‘‘close‘ ...
‘callback‘‘close(gcf)‘)
else
% Save input data.
x = x(:)‘;
set(0‘userdata‘x);
% Initialize figure.
clf reset
set(gcf ...
‘doublebuffer‘‘on‘ ...
‘name‘‘FFT gui‘ ...
‘menu‘‘none‘ ...
‘numbertitle‘‘off‘ ...
‘userdata‘x ...
‘units‘‘normalized‘ ...
‘pos‘[.05 .25 .90 .65] ...
‘doublebuffer‘‘on‘ ...
‘windowbuttondownfcn‘ ...
‘fftgui([]); set(gcf‘‘windowbuttonmotionfcn‘‘‘‘fftgui([])‘‘)‘ ...
‘windowbuttonupfcn‘ ...
‘set(gcf‘‘windowbuttonmotionfcn‘‘‘‘‘‘)‘)
uicontrol(‘tag‘‘fftguirc‘‘string‘‘close‘‘callback‘‘close(gcf)‘);
end
% Initialize four subplots
n = length(x);
idx = 1:n;
y = fft(x);
subplot(221)
u = real(x);
plot([0 n+1][0 0]‘k-‘ [idx;idx][0*u;u]‘c-‘ idxu‘b.‘‘markersize‘16)
axis([0 n+1 -1 1])
set(gca‘xtick‘[])
set(gca‘ytick‘[])
title(‘real(x)‘‘fontname‘‘courier‘‘fontweight‘‘bold‘)
subplot(222)
u = imag(x);
plot([0 n+1][0 0]‘k-‘ [idx;idx][0*u;u]‘c-‘ idxu‘b.‘‘markersize‘16)
axis([0 n+1 -1 1])
set(gca‘xtick‘[])
set(gca‘ytick‘[])
title(‘imag(x)‘‘fontname‘‘courier‘‘fontweight‘‘bold‘)
subplot(223)
u = real(y);
plot([0 n+1][0 0]‘k-‘ [idx;idx][0*u;u]‘c-‘ idxu‘b.‘‘markersize‘16)
axis([0 n+1 -2 2])
set(gca‘xtick‘[])
set(gca‘ytick‘[])
title(‘real(fft(x))‘‘fontname‘‘courier‘‘fontweight‘‘bold‘)
subplot(224)
u = imag(y);
plot([0 n+1][0 0]‘k-‘ [idx;idx][0*u;u]‘c-‘ idxu‘b.‘‘markersize‘16)
axis([0 n+1 -2 2])
set(gca‘xtick‘[])
set(gca‘ytick‘[])
title(‘imag(fft(x))‘‘fontname‘‘courier‘‘fontweight‘‘bold‘)
else
% Respond to mouse motion.
x = get(gcf‘userdata‘);
n = length(x);
pt = get(gcf‘currentpoint‘);
pos = get(gca‘pos‘);
p = round((n+1)*(pt(1)-pos(1))/pos(3));
q = 2*(pt(2)-pos(2))/pos(4)-1;
inplot = 1 + (pt(1)>.5) + 2*(pt(2)<.5);
if (p > 0) && (p < n+1) && (abs(q) <= 1)
switch inplot
case 1
x(p) = q+i*imag(x(p));
y = fft(x);
case 2
x(p) = real(x(p))+i*q;
y = fft(x);
case 3
y = fft(x);
y(p) = 2*q+i*imag(y(p));
- 上一篇:量化投资:以MATLAB为工具-源码+数据
- 下一篇:差分功耗攻击matlab脚本
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论