资源简介
Matlab Simulink三维图形显示模块
具体介绍见我的博客:
http://blog.csdn.net/c_s_d_n_user/article/details/26048089

代码片段和文件信息
function [sys x0 str ts] = sfunxyz(txuflagaxvarargin)
%SFUNXY S-function that acts as an X-Y-Z scope using MATLAB plotting functions.
% This M-file is designed to be used in a Simulink S-function block.
% It draws a line from the previous input point which is stored using
% discrete states and the current point. It then stores the current
% point for use in the next invocation.
%
% See also SFUNXYS LORENZS.
% Copyright 1990-2002 The MathWorks Inc.
% $Revision: 1.38 $
% Andrew Grace 5-30-91.
% Revised Wes Wang 4-28-93 8-17-93 12-15-93
% Revised Craig Santos 10-28-96
% Modified by Giampiero Campa April 04
switch flag
%%%%%%%%%%%%%%%%%%
% Initialization %
%%%%%%%%%%%%%%%%%%
case 0
[sysx0strts] = mdlInitializeSizes(axvarargin{:});
warning off;
SetBlockCallbacks(gcbh);
warning on;
%%%%%%%%%%
% Update %
%%%%%%%%%%
case 2
sys = mdlUpdate(txuflagaxvarargin{:});
%%%%%%%%%
% Start %
%%%%%%%%%
case ‘Start‘
LocalBlockStartFcn
%%%%%%%%
% Stop %
%%%%%%%%
case ‘Stop‘
LocalBlockStopFcn
%%%%%%%%%%%%%%
% NameChange %
%%%%%%%%%%%%%%
case ‘NameChange‘
LocalBlockNameChangeFcn
%%%%%%%%%%%%%%%%%%%%%%%%
% CopyBlock LoadBlock %
%%%%%%%%%%%%%%%%%%%%%%%%
case { ‘CopyBlock‘ ‘LoadBlock‘ }
LocalBlockLoadCopyFcn
%%%%%%%%%%%%%%%
% DeleteBlock %
%%%%%%%%%%%%%%%
case ‘DeleteBlock‘
LocalBlockDeleteFcn
%%%%%%%%%%%%%%%%
% DeleteFigure %
%%%%%%%%%%%%%%%%
case ‘DeleteFigure‘
LocalFigureDeleteFcn
%%%%%%%%%%%%%%%%
% Unused flags %
%%%%%%%%%%%%%%%%
case { 3 9 }
sys = [];
%%%%%%%%%%%%%%%%%%%%
% Unexpected flags %
%%%%%%%%%%%%%%%%%%%%
otherwise
if ischar(flag)
errmsg=sprintf(‘Unhandled flag: ‘‘%s‘‘‘ flag);
else
errmsg=sprintf(‘Unhandled flag: %d‘ flag);
end
error(errmsg);
end
% end sfunxy
%
%=============================================================================
% mdlInitializeSizes
% Return the sizes initial conditions and sample times for the S-function.
%=============================================================================
%
function [sysx0strts] = mdlInitializeSizes(axvarargin)
if length (ax)~=6
error([‘Axes limits must be defined.‘])
end
sizes = simsizes;
sizes.NumContStates = 0;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 0;
sizes.NumInputs = 3*fix(varargin{2});
sizes.DirFeedthrough = 0;
sizes.NumSampleTimes = 1;
sys = simsizes(sizes);
x0 = [];
str = [];
%
% initialize the array of sample times note that in earlier
% versions of this scope a sample time was not one of the input
% arguments the varargs checks for this and if not present assigns
% the sample time to -1 (inherited)
%
ts = [varargin{1} 0];
% end mdlInitializeSizes
%
%================================================================
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 36078 2005-04-25 04:51 lorenz3d.mdl
文件 12581 2005-04-19 15:01 m3dscope.mdl
文件 12420 2005-04-19 02:27 sfunxyz.m
文件 1315 2014-02-12 12:08 license.txt
- 上一篇:剪切波变换MATLAB实现代码
- 下一篇:基于直方图的自适应阈值二值化
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论