help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

extractive variables to files


From: Jim Maas
Subject: extractive variables to files
Date: Thu, 19 Mar 2009 16:44:20 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Apologies for syntax questions here. I have googled and made attempts .... still no luck!

Ben has helped me get an initial script to run, will list it at bottom. Could someone show me how to

  1. extract the values of the variables "ca" and "out" such that I can
     store them in a data file with their appropriate independent
     values of "t" ?
  2. plot the same values of "ca" and "out" vs "t"/
  3. What does the "@" sign stand for here ...I've dug around and
     googled both octave and matlab and can't find it!

Thanks

Jim

%-----------------------------------------------------------------------
% File mmsolve script file
% Demonstrate how to single pool model using ODE
% Call ODE45
% Dr. Jim Maas
% 19/03/09
%-----------------------------------------------------------------------

% Read/assign model parameters -----------------------------------------
vmax = 36.79;
km = 0.22;
sz = 115.0;
qin = 18.63;

% Initial values -------------------------------------------------------
qa0=25.0;

% Auxillary Equations---------------------------------------------------

dqadt = @(t,y)(qin - qaout(t,y,vmax,km,sz));

function [out,ca] = qaout(t,y,vmax,km,sz)
ca = y/sz;
out = vmax/(1+km/ca);
endfunction

% Call a routine to solve ODE ------------------------------------------

[t, y] = ode45 (dqadt, [0:0.1:10], qa0); %Octave

% print/plot results ---------------------------------------------------
plot(t,y);
xlabel('TIME'); ylabel('QUANTITY');

----
Jim Maas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]