help-octave
[Top][All Lists]
Advanced

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

Maxwell's density function grinds Octave


From: Gad Abraham
Subject: Maxwell's density function grinds Octave
Date: Sat, 21 Aug 2004 18:18:45 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Debian/1.7.2-2

Hi,

I've been trying to plot Maxwell's speed distribution equation for ideal gases on Octave, using the following code (adapted from a matlab script on http://chemistryresources.tripod.com/physical/maxwell.txt):

function surf(varargin) mesh(varargin{:}); endfunction

M = 32e-3;
R = 8.31451;

V = 0:1:2000;
t = 273.15:1:1073.15;

[v, T] = meshgrid(V, t);

f = 4*pi*((M./(2*pi*R.*T)).^(3/2)).*(v.^2).*exp(-M.*(v.^2)./(2*R*T));

surf(v,T,f);

xlabel('v');
ylabel('T');
zlabel('f');


The problem is that on my rather fast machine (AthlonXP2800, 768MB RAM), this grinds away for almost 10 minutes, and the end result is a gnuplot window with a only few tiny lines in it.

I'm using Octave2.1, gnuplot 4.0, on Debian Linux.


Any advice?


Thanks,
Gad

--
http://chookies.homeunix.org



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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