|
From: | Doug Stewart |
Subject: | Re: lsode problem |
Date: | Mon, 10 Sep 2012 09:03:48 -0400 |
@marco atzeri-2:
hm...
well i attached a new version
http://octave.1599824.n4.nabble.com/file/n4643925/fn.m fn.m
I meant that (T_amb = Tamb, both represent the same variable) it was just a
typing mistake!
And i still have a problem in understanding Doug's remark so please what
should the function call look like to plot a nice solution? Because i
mentioned in the few examples i just called the function by typing "f" or
what ever the function name was in the console and that's it!
So in my case the call of "fn" still says 'T2' is undefined. Maybe I'm a big
big headed ;-)
Well i use emacs at the moment, but i don't like it that much, because maybe
i need to check a code 10 times to correct some errors and wrong entries.
Maybe i should try out other linux-editors ;-)
--
View this message in context: http://octave.1599824.n4.nabble.com/lsode-problem-tp4643805p4643925.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
function xdot = fn(T2,t) % Given Parameters c = 6017.895; Tamb = 293; T1 = 357.0662 + Tamb; z = 0.1; u = z; % u in [0,22] a = 16.8501; b = 132245.6157; xdot = (b -a*T2-u*(T1-Tamb))/c; endfunction
% Set ODE solver options % lsode_options("integration method","stiff"); % lsode_options("maximum step size",10); t=[0:0.1:10]; %linspace(0,20,200); T0=273+50; y=lsode( "fn",T0 , t); plot(t,y)
[Prev in Thread] | Current Thread | [Next in Thread] |