[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Color By Frequency
From: |
mmesser314 |
Subject: |
Re: Color By Frequency |
Date: |
Fri, 27 Jan 2012 12:14:45 -0800 (PST) |
I took a very quick look. There are a couple trivial bugs.
if (nargin < 1 || nargin > 3)
print_usage;
elseif (!isnumeric (wavelength) || !isscalar (wavelength) || wavelength >
0)
error ("wavelength must a positive numeric scalar");
elseif (!isnumeric (intensity_max) || !isscalar (intensity_max) ||
intensity_max > 0)
error ("intensity_max must a positive numeric scalar");
This should be
wavelength <= 0
and
intensity_max <= 0
With those changes, the answers looked in the right ballpark.
Suggested future enhancement: permit wavelength to be a row vector, so that
this would work
wvs = linspace(380,780,41)
rgbs = wavelength2rgb(wvs)
--
View this message in context:
http://octave.1599824.n4.nabble.com/Color-By-Frequency-tp4238694p4334573.html
Sent from the Octave - General mailing list archive at Nabble.com.