help-octave
[Top][All Lists]
Advanced

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

Best practices in writing functions


From: Gordon Haverland
Subject: Best practices in writing functions
Date: Tue, 3 Sep 2013 21:08:29 -0600
User-agent: KMail/1.13.7 (Linux/3.9-1-686-pae; KDE/4.8.4; i686; ; )

Greetings.

I've been programming  since the late 1970's.  Never got into 
Octave stuff before now.  Matlab has a function (raPsd.m, from 
someone in geophysics?) to do radially averaged power spectra.  I 
am not looking for a power spectra, I am looking for a pair 
distribution function (materials science, condensed matter 
physics).

Same math, different needs.

The matlab function doesn't return anything.  It assumes log-log 
plots and km as the X unit.  I need either log-linear or linear-
linear plotting, and I need to return both the radially averaged 
function and the 2D matrix of the power spectrum.

It doesn't make sense to have a zillion different functions all 
doing about the same thing.  Is there some octave function which 
does the "best" job, that I can use for a template?  Can I 
contribute my modification to Octave?  Is there guidance on 
contributing modified Matlab functions?

I would have expected some of this to be FAQ, but maybe I didn't 
have enough coffee.  I didn't see it.  Sorry if I missed it.

Gord


reply via email to

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