概述
我就用的是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中可以调用的block所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复