Send Help-octave mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-octave digest..."
Today's Topics:
1. Re: Fwd: Gaussian fit of a peak (LUK ShunTim)
2. Re: Gaussian fit of a peak (Rob Mahurin)
3. Re: strange regexp behavior (John W. Eaton)
4. Returned value from function as a global variable (LUK ShunTim)
----------------------------------------------------------------------
Message: 1
Date: Wed, 24 Sep 2008 18:08:21 +0800
From: LUK ShunTim <address@hidden>
Subject: Re: Fwd: Gaussian fit of a peak
To: Andrea Cimatoribus <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=UTF-8
Andrea Cimatoribus wrote:
Here is what Octave says:
octave-3.0.0:3> pkg install miscellaneous-1.0.7.tar.gz
configure: WARNING: no mkoctfile found on path
You need to install the octave3.0-headers debian/ubuntu package (which
provides mkoctfile etc) to install most octave-forge packages.
Regards,
ST
--
------------------------------
Message: 2
Date: Wed, 24 Sep 2008 11:26:23 -0400
From: Rob Mahurin <address@hidden>
Subject: Re: Gaussian fit of a peak
To: "Andrea Cimatoribus" <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Sep 24, 2008, at 4:04 AM, Andrea Cimatoribus wrote:
Unfortunately, I am not sure I will be able to keep "central" area
only, since I am fitting something that resembles a phonon spectra.
In fact, I have multiple peakes to the left and right with respect
to the "zero", but fitting everything with a gaussian balanced to
the zero energy pretty well. I need to do this in order to sum
spectra together. I will let you know if and how I solve this
problem if it is of any intereset.
AC
The leasqr wrapper I mentioned can handle multiple overlapping
Gaussians. You might wonder, for instance, whether a fit to two
unresolved peaks gives a smaller chi-squared per degree of freedom
than a fit to a single peak. This is what the "demo" does for a
dodgy problem with two exponentials. (Though you have to find the
chi2 yourself, sum( ((y-f5)./errscale).^2 ), after the demo runs,
because I wasn't thinking of this when I wrote it).
If you have some constant background you'll have to subtract it by
hand for now.
code, again, at
http://sns.phys.utk.edu/~mahurin/octave/
Cheers,
Rob
--
Rob Mahurin
Dept. of Physics & Astronomy
University of Tennessee phone: 865 207 2594
Knoxville, TN 37996 email: address@hidden
------------------------------
Message: 3
Date: Wed, 24 Sep 2008 11:40:21 -0400
From: "John W. Eaton" <address@hidden>
Subject: Re: strange regexp behavior
To: David Bateman <address@hidden>
Cc: address@hidden, "G.." <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
On 23-Sep-2008, David Bateman wrote:
| Ok, then what about the attached changeset for 3.1.51+ based on your
| patch that
|
| * Adds a call to OCTAVE_QUIT
| * Adds the loop counter to terminate for truly infinitely recursive
patterns
| * Adds a test based on the previously failing code.
|
| I compiled and tested this sucessfully with 3.1.51+ and suppose it will
| work for 3.0.2+ as well.
I applied it.
Thanks,
jwe
------------------------------
Message: 4
Date: Thu, 25 Sep 2008 00:20:13 +0800
From: LUK ShunTim <address@hidden>
Subject: Returned value from function as a global variable
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I had some matlab code which uses global variables to allow common
access to returned values from functions. It appears that octave doesn't
allow such behaviour. Here's a short function which produces an error in
octave.
function [v]=t_global_f(x)
global v;
v = sin(x);
endfunction
octave:1> x=0:0.1:pi;
octave:2> v=t_global_f(x);
error: can't make function parameter `v' global
error: evaluating global command near line 6, column 1
error: called from `t_global_f' in file
`/home/0/00work/octave/00snippets/t_global_f.m'
error: evaluating assignment expression near line 2, column 2
Is there any plan to implement the same behaviour in octave?
Regards,
ST
--
------------------------------
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
End of Help-octave Digest, Vol 30, Issue 65
*******************************************