我就用的是S-Function函数,会报错是:Output returned by S-function 'pink_noise_s2' in 'xahrng_sim/S-Function1' during flag=3 call must be a real vector of length 1。
我现在写的程序是如下:求高手帮我debug啊,着急中!
function [sys,x0,str,ts] = sfuntmpl(t,x,u,flag)
%SFUNTMPL General M-file S-function template
% With M-file S-functions, you can define you own ordinary differential
% equations (ODEs), discrete system equations, and/or just about
% any type of algorithm to be used within a Simulink block diagram.
%
% The general form of an M-File S-function syntax is:
% [SYS,X0,STR,TS] = SFUNC(T,X,U,FLAG,P1,...,Pn)
%
% What is returned by SFUNC at a given point in time, T, depends on the
% value of the FLAG, the current state vector, X, and the current
% input vector, U.
%
% F
最后
以上就是含糊铅笔最近收集整理的关于matlab中组间设置block,.m文件如何变成simulink中可以调用的block的全部内容,更多相关matlab中组间设置block,.m文件如何变成simulink中可以调用内容请搜索靠谱客的其他文章。
发表评论 取消回复