[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Maxwell's density function grinds Octave
From: |
Henry F. Mollet |
Subject: |
Re: Maxwell's density function grinds Octave |
Date: |
Sun, 22 Aug 2004 11:21:23 -0700 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
The first posting, which I later found in the bulk box, included the
following code:
%To remove the grid lines within the graph surface
%To make the coloring more uniform
shading interp;
This must be the reason that Gnuplot and Matlab were running out of colors.
Henry
on 8/21/04 11:45 AM, Henry F. Mollet at address@hidden wrote:
> Why is a problem of running out of colors rather than only a problem of too
> fine a grid? I only get two colors, red outside and green inside of what
> can be seen of the saddle.
> GNU Octave, version 2.1.46 (powerpc-apple-darwin6.6)
> G N U P L O T Version 3.8i patchlevel 0
> Henry
>
>
> on 8/21/04 4:40 AM, Paul Thomas at address@hidden wrote:
>
>> 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
>> -------------------------------------------------------------
>>
>
>
>
> -------------------------------------------------------------
> 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
-------------------------------------------------------------