资源简介
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实现代码
- 双闭环直流调速MATLAB仿真模型基于传
- MATLAB辅助现代工程数字信号处理源程
- bpa转matpower
- PAM系统仿真matlab版本
- 基于matlab的RBF神经网络模式分类
- 利用matlab实现的简单的基于卡尔曼滤
- MATLAB2019A破解版百度云链接(已亲测
- Matlab2018B破解版云盘链接.rar
- Matlab遗传算法工具箱gaot及安装
- 量子粒子群算法的matlab实现,有程序
- 图像清晰度评价函数
- MATLAB神经网络应用设计第二版源代码
-
SPWM Simuli
nk仿真程序 - 三次样条插值函数csape的用法
- arrow3.m--Matlab
- 随机森林Matlab
- 蚁群算法采用matlab开发的仿真平台
- GPS基本原理及其MATLAB实现全部MATLAB程
- matlab_倾斜校正算法代码
-
OFDM的QPSK的simuli
nk仿真,matlab 2016a版 - AWGN信道的蒙特卡洛仿真
- Matlab Maggiwick
- 非常好用的MATLAB混沌工具箱
- MATLAB绘制2维数据点程序,用于显示聚
- 平均间隙法matlab代码
- matlab图像互信息计算
- 鸡群算法CSOmatlab程序代码
- 香农编码、霍夫曼编码比较的matlab源
- 三次样条插值的MATLAB程序
评论
共有 条评论