Matlab °æ (¾«»ªÇø)
·¢ÐÅÈË: zjliu (ÇïÌìµÄÂܲ·), ÐÅÇø: Matlab
±ê Ìâ: [ºÏ¼¯]°ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2003Äê07ÔÂ13ÈÕ21:51:07 ÐÇÆÚÌì), Õ¾ÄÚÐżþ
·¢ÐÅÈË: longriver (Ò¶×Ó), ÐÅÇø: Matlab
±ê Ìâ: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (Tue Jun 17 21:57:11 2003)
function [sys,x0,str,ts] = neurok(t,x,u,flag)
K0=12;
a=0.1*K0;
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes(a,K0);
case 3,
sys=mdlOutputs(t,x,u,a,K0);
case {1 , 2 , 4 , 9},
sys=[];
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
%----------------------------------------------------------------------
%Initialization
%----------------------------------------------------------------------
function [sys,x0,str,ts]=mdlInitializeSizes(a,K0)
sizes = simsizes;
sizes.NumContStates = 0;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 1;
sizes.NumInputs = 2;
sizes.DirFeedthrough = 1; %Ö±½ÓÀ¡Í¨µÄ±êÖ¾
sizes.NumSampleTimes = 1; % at least one sample time is needed
sys = simsizes(sizes);
x0 = [];
str = [];
ts = [1 0];
%----------------------------------------------------------------------
% Outputs
%----------------------------------------------------------------------
function sys=mdlOutputs(t,x,u,a,K0)
zengyi=K0 %+(a*(u(1)/-u(2))^3)/10^3
sys=zengyi;
ÎÒ¾õµÃÓ¦¸Ãû´í£¬µ«ÊÇÊä³ö½á¹ûÊÇ-INF,²»ÖªµÀΪʲô£¿
--
¡ù À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn [FROM: 202.118.231.9]
·¢ÐÅÈË: sayyou (ÏÂÒ»¸öÈÎÎñÄѶÈÆĸß), ÐÅÇø: Matlab
±ê Ìâ: Re: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2003Äê06ÔÂ18ÈÕ13:15:42 ÐÇÆÚÈý), Õ¾ÄÚÐżþ
ÎÒÕâÀïÔËÐÐûÓÐÎÊÌ⣬Á½¸öÊäÈëΪu(1)=100,u(2)=2ʱ£¬Êä³öΪ-138
ÊÖËãÒ²ÊÇÕâ¸ö½á¹û¡£
ÁíÍ⣬²ÎÊý´«µÝʱ£¬³£²ÎÊýK0£¬a¿ÉÒÔÕâô´«
ÔÚS-FunctionÄ£¿éS-function parameters¿òÖÐÌîд
100,2
º¯Êý¶¨Òåʱ
function [sys,x0,str,ts] = neurok(t,x,u,flag,K0,a)
¶ÔÓ¦µÄ¾ÍÊÇK0ÊÇ100£¬aÊÇ2
¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
:
: function [sys,x0,str,ts] = neurok(t,x,u,flag)
: K0=12;
: a=0.1*K0;
: switch flag,
: case 0,
: [sys,x0,str,ts]=mdlInitializeSizes(a,K0);
: case 3,
: sys=mdlOutputs(t,x,u,a,K0);
: case {1 , 2 , 4 , 9},
: sys=[];
--
¡ù À´Ô´:¡¤¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn¡¤[FROM: 202.118.228.18]
·¢ÐÅÈË: longriver (Ò¶×Ó), ÐÅÇø: Matlab
±ê Ìâ: Re: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (Wed Jun 18 13:57:37 2003)
ÎÒÔÚS-function parametersÀïʲôҲûÌîд
ÎÒ°´ÕÕÄã˵µÄÊÔÁËÒ²²»Ðа¡
¡¾ ÔÚ sayyou µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ÎÒÕâÀïÔËÐÐûÓÐÎÊÌ⣬Á½¸öÊäÈëΪu(1)=100,u(2)=2ʱ£¬Êä³öΪ-138
: ÊÖËãÒ²ÊÇÕâ¸ö½á¹û¡£
: ÁíÍ⣬²ÎÊý´«µÝʱ£¬³£²ÎÊýK0£¬a¿ÉÒÔÕâô´«
: ÔÚS-FunctionÄ£¿éS-function parameters¿òÖÐÌîд
: 100,2
: º¯Êý¶¨Òåʱ
: function [sys,x0,str,ts] = neurok(t,x,u,flag,K0,a)
: ¶ÔÓ¦µÄ¾ÍÊÇK0ÊÇ100£¬aÊÇ2
: ¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: :
: : function [sys,x0,str,ts] = neurok(t,x,u,flag)
: : K0=12;
: : a=0.1*K0;
: : switch flag,
: : case 0,
: : [sys,x0,str,ts]=mdlInitializeSizes(a,K0);
: : case 3,
: : sys=mdlOutputs(t,x,u,a,K0);
: : case {1 , 2 , 4 , 9},
: : sys=[];
--
¡ù À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn [FROM: 202.118.231.9]
·¢ÐÅÈË: ghb (±ÕÃÅÐÞÁ¶ Ö® ×À×Ó¿ª»¨), ÐÅÇø: Matlab
±ê Ìâ: Re: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2003Äê06ÔÂ18ÈÕ14:03:20 ÐÇÆÚÈý), Õ¾ÄÚÐżþ
Sayyou˵µÄÊÇû´íµÄ£¬ÄãºÃºÃ¿´Ò»ÏÂËû˵µÄ¡£ÄãÔÚÕâ¸öSº¯ÊýÖУ¬Êµ¼ÊÉÏ´¦ÀíµÄÊÇÒ»¸ö´úÊý
ÔËË㣬ºÃÏñû±ØÒªÓÃSº¯ÊýµÄ
¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ÎÒÔÚS-function parametersÀïʲôҲûÌîд
: ÎÒ°´ÕÕÄã˵µÄÊÔÁËÒ²²»Ðа¡
: ¡¾ ÔÚ sayyou µÄ´ó×÷ÖÐÌáµ½: ¡¿
: : ÎÒÕâÀïÔËÐÐûÓÐÎÊÌ⣬Á½¸öÊäÈëΪu(1)=100,u(2)=2ʱ£¬Êä³öΪ-138
: : ÊÖËãÒ²ÊÇÕâ¸ö½á¹û¡£
: : ÁíÍ⣬²ÎÊý´«µÝʱ£¬³£²ÎÊýK0£¬a¿ÉÒÔÕâô´«
: : ÔÚS-FunctionÄ£¿éS-function parameters¿òÖÐÌîд
: : 100,2
: : º¯Êý¶¨Òåʱ
: : function [sys,x0,str,ts] = neurok(t,x,u,flag,K0,a)
: : ¶ÔÓ¦µÄ¾ÍÊÇK0ÊÇ100£¬aÊÇ2
--
©§Ç§©§¡¡©¥¡¡ ©¥©¥ ©§Ð©§| |_| | _ _ _ _ _ _ _ _ ¡î 2002 ¡î
©§ìû©§©¥©×©¥©³©¥©·©§´º©§| _ | /'_` )( '_`\ ( '_`\ ( ) ( )×£´ó¼ÒÐÂÄê¿ìÀÖ!
©§¾Ù©§©§©§©§©»©¥©¿©§ÆÕ©§| | | |( (_| || (_) )| (_) )| (_) |
©§ÊÀ©§©§©§©§©³©×©·©§Ì쩧(_) (_)`\__,_)| ,__/'| ,__/'`\__, |
©§¹²©§¡¡©§¡¡©§©ï©§©§Í¬©§ | | | | ( )_| |
©§»¶©§¡¡©¿¡¡©»©ß©¿©§Ç쩧 (_) (_) `\___/
¡ù À´Ô´:¡¤¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn¡¤[FROM: 202.118.237.199]
·¢ÐÅÈË: longriver (Ò¶×Ó), ÐÅÇø: Matlab
±ê Ìâ: Re: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (Wed Jun 18 14:10:02 2003)
ÔÚsimulinkÀïҪʵÏÖÕâÑùÔËË㣬Èç¹û²»ÓÃsº¯Êý£¬¸ÃÔõôʵÏÖ£¿
¡¾ ÔÚ ghb µÄ´ó×÷ÖÐÌáµ½: ¡¿
: Sayyou˵µÄÊÇû´íµÄ£¬ÄãºÃºÃ¿´Ò»ÏÂËû˵µÄ¡£ÄãÔÚÕâ¸öSº¯ÊýÖУ¬Êµ¼ÊÉÏ´¦ÀíµÄÊÇÒ»¸..
: ÔËË㣬ºÃÏñû±ØÒªÓÃSº¯ÊýµÄ
: ¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: : ÎÒÔÚS-function parametersÀïʲôҲûÌîд
: : ÎÒ°´ÕÕÄã˵µÄÊÔÁËÒ²²»Ðа¡
--
¡ù À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn [FROM: 202.118.231.9]
·¢ÐÅÈË: ghb (±ÕÃÅÐÞÁ¶ Ö® ×À×Ó¿ª»¨), ÐÅÇø: Matlab
±ê Ìâ: Re: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2003Äê06ÔÂ18ÈÕ14:20:48 ÐÇÆÚÈý), Õ¾ÄÚÐżþ
Simulink Library Browser ÖÐÓеÄSimulinkÖÐÓÐUser-Defined FunctionsÖÐÓÐFcnÄ£¿é
¡£Äã°ÑÄãҪʵÏֵĴúÊýÔËËã°´ÒªÇóдµ½Õâ¶ù¾Í¿ÉÒÔÁË¡£
¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ÔÚsimulinkÀïҪʵÏÖÕâÑùÔËË㣬Èç¹û²»ÓÃsº¯Êý£¬¸ÃÔõôʵÏÖ£¿
: ¡¾ ÔÚ ghb µÄ´ó×÷ÖÐÌáµ½: ¡¿
: : Sayyou˵µÄÊÇû´íµÄ£¬ÄãºÃºÃ¿´Ò»ÏÂËû˵µÄ¡£ÄãÔÚÕâ¸öSº¯ÊýÖУ¬Êµ¼ÊÉÏ´¦ÀíµÄÊÇÒ»¸..
: : ÔËË㣬ºÃÏñû±ØÒªÓÃSº¯ÊýµÄ
: : ¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
--
©§Ç§©§¡¡©¥¡¡ ©¥©¥ ©§Ð©§| |_| | _ _ _ _ _ _ _ _ ¡î 2002 ¡î
©§ìû©§©¥©×©¥©³©¥©·©§´º©§| _ | /'_` )( '_`\ ( '_`\ ( ) ( )×£´ó¼ÒÐÂÄê¿ìÀÖ!
©§¾Ù©§©§©§©§©»©¥©¿©§ÆÕ©§| | | |( (_| || (_) )| (_) )| (_) |
©§ÊÀ©§©§©§©§©³©×©·©§Ì쩧(_) (_)`\__,_)| ,__/'| ,__/'`\__, |
©§¹²©§¡¡©§¡¡©§©ï©§©§Í¬©§ | | | | ( )_| |
©§»¶©§¡¡©¿¡¡©»©ß©¿©§Ç쩧 (_) (_) `\___/
¡ù À´Ô´:¡¤¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn¡¤[FROM: 202.118.237.199]
·¢ÐÅÈË: longriver (Ò¶×Ó), ÐÅÇø: Matlab
±ê Ìâ: Re: °ïæ¿´¿´s-functionµÄÎÊÌâ
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (Wed Jun 18 15:08:08 2003)
лл£¬ÎÒÖªµÀ´íÔÚÄÄÀïÁË¡£
¡¾ ÔÚ ghb µÄ´ó×÷ÖÐÌáµ½: ¡¿
: Simulink Library Browser ÖÐÓеÄSimulinkÖÐÓÐUser-Defined FunctionsÖÐÓÐFcnÄ£..
: ¡£Äã°ÑÄãҪʵÏֵĴúÊýÔËËã°´ÒªÇóдµ½Õâ¶ù¾Í¿ÉÒÔÁË¡£
: ¡¾ ÔÚ longriver (Ò¶×Ó) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: : ÔÚsimulinkÀïҪʵÏÖÕâÑùÔËË㣬Èç¹û²»ÓÃsº¯Êý£¬¸ÃÔõôʵÏÖ£¿
--
¡ù À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn [FROM: 202.118.231.9]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º4.262ºÁÃë