help-octave
[Top][All Lists]
Advanced

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

Re: Maxwell's density function grinds Octave


From: Paul Thomas
Subject: Re: Maxwell's density function grinds Octave
Date: Sat, 21 Aug 2004 13:40:34 +0200

Reduce the mesh dimensions by a factor 20x10!

ie.

> V = 0:20:2000;
> t = 273.15:10:1073.15;

octave did OK with the original but Gnuplot crashed!  Matlab R13 does not do
well with the original mesh either.  Both run out of colours for the plot.

Paul T

----- Original Message ----- 
From: "Gad Abraham" <address@hidden>
To: <address@hidden>
Sent: Saturday, August 21, 2004 10:18 AM
Subject: Maxwell's density function grinds Octave


> 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
> -------------------------------------------------------------
>



-------------------------------------------------------------
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]