Prev: Stoping the execution of ode45 function before time has reached the end of tspan and continuing from the following command.
Next: www.voguesneakers.com Cheap Jordan Shoes,Cheap Nike Shox Shoes
From: trung trinh on 13 Apr 2010 07:45 i have a test for a program simulink. below the picture http://i405.photobucket.com/albums/pp133/trungkstn/ql_2136abe693e125e91f4e050803b61a4b.gif and i use bb.m for MATLAB function.and below it is code of bb.m function f = bb(t) syms x; a = sin(x)*cos(t) f = int(a,0,1); although if f is function of variable t but simulink report a error. How to deal with this problem ? Thank for assistance
From: Steven Lord on 13 Apr 2010 11:04
"trung trinh" <trungkstn(a)gmail.com> wrote in message news:hq1lgk$9lm$1(a)fred.mathworks.com... >i have a test for a program simulink. below the picture > http://i405.photobucket.com/albums/pp133/trungkstn/ql_2136abe693e125e91f4e050803b61a4b.gif > > and i use bb.m for MATLAB function.and below it is code of bb.m > > function f = bb(t) > syms x; > a = sin(x)*cos(t) > f = int(a,0,1); > > although if f is function of variable t but simulink report a error. How > to deal with this problem ? bb should return a double array. Add this as the last line of the function: f = double(f); -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ |