From: Steven Lord on 14 Jan 2010 09:06 "Paulo " <biomar1(a)yahoo.com.br> wrote in message news:hin1sb$4ue$1(a)fred.mathworks.com... > Help !!!! > "Paulo " <biomar1(a)yahoo.com.br> wrote in message > <hild11$t8a$1(a)fred.mathworks.com>... >> Thank you guys. Worked very well. So I've gone to try with ode solving >> between diferent functions. But now I got stucked again: >> >> Iam still trying to solve diferent odes changing one parameter: >> Suppose I want to solve using ode23, one function, wich I need to choose, >> and let select.m be the calling sintax: >> >> y = selectAFunction(n); >> >> Iam trying to use >> >> [t,y] = ode23(@select, tspan, ci); to solve one of my differentials >> equations (each a diferent function) pointed at "selectAFunction" by a >> parameter at select.m Well, looks confuse, but I have now idea how to get >> better. Please help ! :-) Another hint: function y = chooseFunctionHandle(n) switch n case 1 y = @sin; case 2 y = @cos; case 3 y = @tan; % error handling omitted end y = chooseFunctionHandle(1); t = 0:0.1:2*pi; plot(t, y(t), 'go', t, sin(t), 'r+') -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
First
|
Prev
|
Pages: 1 2 Prev: problem with lsqcurvefit Next: speech to text conversion using matlab. |