You can subscribe to this list here.
2001 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(10) 
_{Aug}
(5) 
_{Sep}
(3) 
_{Oct}
(41) 
_{Nov}
(41) 
_{Dec}
(33) 

2002 
_{Jan}
(75) 
_{Feb}
(10) 
_{Mar}
(170) 
_{Apr}
(174) 
_{May}
(66) 
_{Jun}
(11) 
_{Jul}
(10) 
_{Aug}
(44) 
_{Sep}
(73) 
_{Oct}
(28) 
_{Nov}
(139) 
_{Dec}
(52) 
2003 
_{Jan}
(35) 
_{Feb}
(93) 
_{Mar}
(62) 
_{Apr}
(10) 
_{May}
(55) 
_{Jun}
(70) 
_{Jul}
(37) 
_{Aug}
(16) 
_{Sep}
(56) 
_{Oct}
(31) 
_{Nov}
(57) 
_{Dec}
(83) 
2004 
_{Jan}
(85) 
_{Feb}
(67) 
_{Mar}
(27) 
_{Apr}
(37) 
_{May}
(75) 
_{Jun}
(85) 
_{Jul}
(160) 
_{Aug}
(68) 
_{Sep}
(104) 
_{Oct}
(25) 
_{Nov}
(39) 
_{Dec}
(23) 
2005 
_{Jan}
(10) 
_{Feb}
(45) 
_{Mar}
(43) 
_{Apr}
(19) 
_{May}
(108) 
_{Jun}
(31) 
_{Jul}
(41) 
_{Aug}
(23) 
_{Sep}
(65) 
_{Oct}
(58) 
_{Nov}
(44) 
_{Dec}
(54) 
2006 
_{Jan}
(96) 
_{Feb}
(27) 
_{Mar}
(69) 
_{Apr}
(59) 
_{May}
(67) 
_{Jun}
(35) 
_{Jul}
(13) 
_{Aug}
(461) 
_{Sep}
(160) 
_{Oct}
(399) 
_{Nov}
(32) 
_{Dec}
(72) 
2007 
_{Jan}
(316) 
_{Feb}
(305) 
_{Mar}
(318) 
_{Apr}
(54) 
_{May}
(194) 
_{Jun}
(173) 
_{Jul}
(282) 
_{Aug}
(91) 
_{Sep}
(227) 
_{Oct}
(365) 
_{Nov}
(168) 
_{Dec}
(18) 
2008 
_{Jan}
(71) 
_{Feb}
(111) 
_{Mar}
(155) 
_{Apr}
(173) 
_{May}
(70) 
_{Jun}
(67) 
_{Jul}
(55) 
_{Aug}
(83) 
_{Sep}
(32) 
_{Oct}
(68) 
_{Nov}
(80) 
_{Dec}
(29) 
2009 
_{Jan}
(46) 
_{Feb}
(18) 
_{Mar}
(95) 
_{Apr}
(76) 
_{May}
(140) 
_{Jun}
(98) 
_{Jul}
(84) 
_{Aug}
(123) 
_{Sep}
(94) 
_{Oct}
(131) 
_{Nov}
(142) 
_{Dec}
(125) 
2010 
_{Jan}
(128) 
_{Feb}
(158) 
_{Mar}
(172) 
_{Apr}
(134) 
_{May}
(94) 
_{Jun}
(84) 
_{Jul}
(32) 
_{Aug}
(127) 
_{Sep}
(167) 
_{Oct}
(109) 
_{Nov}
(69) 
_{Dec}
(78) 
2011 
_{Jan}
(39) 
_{Feb}
(58) 
_{Mar}
(52) 
_{Apr}
(47) 
_{May}
(56) 
_{Jun}
(76) 
_{Jul}
(55) 
_{Aug}
(54) 
_{Sep}
(165) 
_{Oct}
(255) 
_{Nov}
(328) 
_{Dec}
(263) 
2012 
_{Jan}
(82) 
_{Feb}
(147) 
_{Mar}
(400) 
_{Apr}
(216) 
_{May}
(209) 
_{Jun}
(160) 
_{Jul}
(86) 
_{Aug}
(141) 
_{Sep}
(156) 
_{Oct}
(6) 
_{Nov}

_{Dec}

S  M  T  W  T  F  S 



1
(8) 
2
(2) 
3
(2) 
4
(3) 
5
(5) 
6
(8) 
7
(20) 
8
(4) 
9
(15) 
10
(16) 
11
(9) 
12
(3) 
13
(1) 
14
(6) 
15
(4) 
16
(1) 
17
(6) 
18
(5) 
19

20

21
(10) 
22
(9) 
23
(6) 
24
(1) 
25
(3) 
26
(4) 
27
(3) 
28
(2) 
29
(13) 
30
(4) 



From: <adb014@us...>  20080402 15:12:24

Revision: 4850 http://octave.svn.sourceforge.net/octave/?rev=4850&view=rev Author: adb014 Date: 20080402 08:12:25 0700 (Wed, 02 Apr 2008) Log Message:  Support BMPs, remove flags to convert that cause some issues with image reads (For Kristian Rumberg) Modified Paths:  trunk/octaveforge/main/image/inst/imread.m Modified: trunk/octaveforge/main/image/inst/imread.m ===================================================================  trunk/octaveforge/main/image/inst/imread.m 20080402 14:04:01 UTC (rev 4849) +++ trunk/octaveforge/main/image/inst/imread.m 20080402 15:12:25 UTC (rev 4850) @@ 31,6 +31,12 @@ ## Date: 20 December 2006 ## Change parsing of imagemagick's output to get the 'color' depth for grayscale ## images +## +## Modified Kristian Rumberg <kristianrumberg@...> +## Date 2 April 2008 +## Imread now works with BMP's created with "convert inputimage out.bmp" +## (tested with stable release Octave 3.0 in GNU/Linux and Windows XP), +## modified the calling parameters to identify and convert function varargout = imread(filename, varargin) if (nargin != 1) @@ 68,11 +74,11 @@ break endif  [sys, ident] = system(sprintf('identify verbose %s  grep e "bits" e Type', fn)); + [sys, ident] = system(sprintf('identify verbose \"%s\"  grep e "bit" e Type', fn)); if (sys != 0) error("imread: error running ImageMagick's 'identify' on %s", fn); endif  depth = re_grab("([[:digit:]]{1,2})bits", ident); + depth = re_grab("([[:digit:]]{1,2})bit", ident); imtype = re_grab("Type: ([[:alpha:]]*)", ident); depth = str2num(depth); @@ 99,8 +105,9 @@ ## cmd = sprintf("convert flatten strip %s %s:", fn, fmt); tmpf = [tmpnam(), ".", fmt];  cmd = sprintf("convert flatten strip +compress '%s' '%s' 2>/dev/null",  fn, tmpf); + ##cmd = sprintf("convert flatten strip +compress '%s' '%s' 2>/dev/null", + ## fn, tmpf); + cmd = sprintf("convert \"%s\" \"%s\"", fn, tmpf); sys = system(cmd); if (sys != 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <jjstickel@us...>  20080402 14:04:14

Revision: 4849 http://octave.svn.sourceforge.net/octave/?rev=4849&view=rev Author: jjstickel Date: 20080402 07:04:01 0700 (Wed, 02 Apr 2008) Log Message:  import datasmoothing package Added Paths:  trunk/octaveforge/main/datasmoothing/ trunk/octaveforge/main/datasmoothing/COPYING trunk/octaveforge/main/datasmoothing/DESCRIPTION trunk/octaveforge/main/datasmoothing/inst/ trunk/octaveforge/main/datasmoothing/inst/ddmat.m trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmdd.m trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmddwrap.m trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmooth.m trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscat.m trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscatwrap.m trunk/octaveforge/main/datasmoothing/inst/tkrgscatdatasmooth.m Added: trunk/octaveforge/main/datasmoothing/COPYING ===================================================================  trunk/octaveforge/main/datasmoothing/COPYING (rev 0) +++ trunk/octaveforge/main/datasmoothing/COPYING 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,337 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/>; + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +softwareto make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machinereadable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machinereadable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royaltyfree redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>;. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouseclicks or menu itemswhatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: trunk/octaveforge/main/datasmoothing/DESCRIPTION ===================================================================  trunk/octaveforge/main/datasmoothing/DESCRIPTION (rev 0) +++ trunk/octaveforge/main/datasmoothing/DESCRIPTION 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,12 @@ +Name: datasmoothing +Version: 1.0.0 +Date: 20080402 +Author: Jonathan Stickel +Maintainer: The Octave Community +Title: Data smoothing +Description: Algorithms for smoothing noisy data +Categories: Datasmoothing +Depends: octave (>= 2.9.7) +Autoload: yes +License: GPL version 2 or later +Url: http://octave.sf.net Added: trunk/octaveforge/main/datasmoothing/inst/ddmat.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/ddmat.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/ddmat.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,38 @@ +function D = ddmat(x, d) +%%function D = ddmat(x, d) +%% Compute divided differencing matrix of order d +%% +%% Input +%% x: vector of sampling positions +%% d: order of diffferences +%% Output +%% D: the matrix; D * Y gives divided differences of order d +%% +%%References: Anal. Chem. (2003) 75, 3631. +%% + +%% corrected the recursion multiplier; JJS 2/25/08 + +%% Copyright (C) 2003 Paul Eilers +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +m = length(x); +if d == 0 + D = speye(m); +else + dx = x((d + 1):m)  x(1:(m  d)); + V = spdiags(1 ./ dx, 0, m  d, m  d); + D = d * V * diff(ddmat(x, d  1)); +end Added: trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmdd.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmdd.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmdd.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,81 @@ +%%ys = tkrgdatasmdd (x, y, lambda) +%%ys = tkrgdatasmdd (x, y, lambda, d) +%%[ys, v] = tkrgdatasmdd (...) +%% +%% Smooths the tkrgdata of y vs. x values by +%% Tikhonov regularization and divided differences (arbitrary spacing of x). +%% Input: +%% x: data series of sampling positions (must be increasing) +%% y: data series, assumed to be sampled at equal intervals +%% lambda: smoothing parameter; large lambda gives smoother result +%% d: order of smoothing derivative +%% Output: +%% ys: smoothed data +%% v: generalized crossvalidation variance +%% +%% References: Anal. Chem. (2003) 75, 3631; AIChE J. (2006) 52, 325 +%% + +%% Addapted with permission from 'whitsmdd', Paul Eilers, 2003 + +%% Copyright (C) 2008 Jonathan Stickel +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +function [ys, v] = tkrgdatasmdd(x, y, lambda, d) + + %% Defaults if not provided + if nargin <= 3 + d = 2; + endif + + %% find the average dx in order to scale lambda + L = x(end)  x(1); + N = length(x); + dx = L/(N1); + + %% form the matrices + %% D is the derivative matrix + D = ddmat(x,d); + + %% B and Btilda are total integration matrices + Bhat = spdiag(ones(N1,1),1) + spdiag(ones(N1,1),1); + Bhat(1,1) = 1; + Bhat(N,N) = 1; + B = 1/2*spdiag(Bhat*x); + %%B = 1/dx*speye(N,N); % force equal waiting, even for variable spaced x? + if ( floor(d/2) == d/2 ) % test if d is even + dh = d/2; + Btilda = B(dh+1:Ndh,dh+1:Ndh); + else % d is odd + dh = ceil(d/2); + Btilda = B(dh:Ndh,dh:Ndh); + endif + + %% Smoothing + delta = sqrt(trace(D'*D)); % a suitable invariant of D for scaling lambda + %%f = (B + lambda*D'*Btilda*D) \ B*y; + C = chol(B + lambda*delta^(1)*D'*Btilda*D); + ys = C \ (C' \ B*y); + + %% Computation of hat diagonal and crossvalidation + if (nargout > 1) + %% from AIChE J. (2006) 52, 325 + %%H = (B + lambda*D'*Btilda*D) \ B; + H = C \ (C' \ B); + %% note: this is variance, squared of the standard error that Eilers uses + v = (y  ys)'*B*(y  ys) / (1  trace(H)/N)^2; + endif + +endfunction Added: trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmddwrap.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmddwrap.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmddwrap.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,37 @@ +%%cvestdevdif = tkrgdatasmddwrap (log10lambda, x, y, d, 'cve''stdev'[, stdev]) +%% +%% Wrapper function for tkrgdatasmdd in order to minimize over lambda +%% w.r.t. crossvalidation error OR the squared difference between the +%% standard deviation of data from the smooth data and the given +%% standard deviation. +%% + +%% Copyright (C) 2008 Jonathan Stickel +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +function out = tkrgdatasmddwrap (log10lambda, x, y, d, mintype, stdev) + + lambda = 10^(log10lambda); + + if ( strcmp(mintype,"stdev") ) + ys = tkrgdatasmdd(x, y, lambda, d); + stdevd = std(yys); + out = (stdevd  stdev)^2; + else + [ys, cve] = tkrgdatasmdd(x, y, lambda, d); + out = cve; + endif + +endfunction Added: trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmooth.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmooth.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmooth.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,147 @@ +%%[ys, lambda] = tkrgdatasmooth (x, y) +%%[ys, lambda] = tkrgdatasmooth (x, y, d) +%%[ys, lambda] = tkrgdatasmooth (x, y, d, option, value) +%% +%% Smooths the y values of 1D data by Tikhonov regularization. The x +%% values need not be equally spaced but they should be ordered (and +%% nonoverlapping). The order of the smoothing derivative 'd', can be +%% provided (default is 2), and the optionvalue pair should be either +%% the regularizaiton parameter "lambda" or the standard deviation +%% "stdev" of the randomness in the data. With no option supplied, +%% generalized crossvalidation is used to determine lambda. +%% Reference: Anal. Chem. (2003) 75, 3631. +%% See also: tkrgscatdatasmooth, +%% + + +%% Copyright (C) 2008 Jonathan Stickel +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +function [ys, lambda] = tkrgdatasmooth (x, y, d, option, value) + + if (length(x)!=length(y)) + error("x and y must be equal length vectors") + endif + if ( size(x)(1)==1 ) + x = x'; + endif + if ( size(y)(1)==1 ) + y = y'; + endif + + if (nargin < 3) + d = 2; + endif + + guess = 0; + if (nargin > 3) + if ( strcmp(option,"lambda") ) + %% if lambda provided, use it directly + lambda = value; + elseif ( strcmp(option,"stdev") ) + %% if stdev is provided, scale it and use it + stdev = value; + opt = optimset("TolFun",1e6,"MaxFunEvals",20); + log10lambda = fminunc ("tkrgdatasmddwrap", guess, opt, x, y, d, "stdev", stdev); + lambda = 10^log10lambda; + else + warning("option %s is not recognized; using crossvalidation",option) + endif + else + %% perform crossvalidation + opt = optimset("TolFun",1e4,"MaxFunEvals",20); + log10lambda = fminunc ("tkrgdatasmddwrap", guess, opt, x, y, d, "cve"); + lambda = 10^log10lambda; + endif + + ys = tkrgdatasmdd(x, y, lambda, d); + +endfunction + + +%!demo +%! npts = 100; +%! x = linspace(0,1,npts)'; +%! x = x + 1/npts*(rand(npts,1)0.5); +%! y = sin(10*x); +%! stdev = 1e1; +%! y = y + stdev*randn(npts,1); +%! yp = ddmat(x,1)*y; +%! y2p = ddmat(x,2)*y; +%! d = 4; +%! [ys, lambda] = tkrgdatasmooth (x,y,d); +%! lambda +%! ysp = ddmat(x,1)*ys; +%! ys2p = ddmat(x,2)*ys; +%! figure(1); +%! plot(x,y,'o',x,ys) +%! figure(2); +%! plot(x(1:end1),[yp,ysp]) +%! axis([min(x),max(x),min(ysp)abs(min(ysp)),max(ysp)*2]) +%! figure(3) +%! plot(x(2:end1),[y2p,ys2p]) +%! axis([min(x),max(x),min(ys2p)abs(min(ys2p)),max(ys2p)*2]) +%! % +%! % this demo used generalized crossvalidation to determine lambda + +%!demo +%! npts = 100; +%! x = linspace(0,1,npts)'; +%! x = x + 1/npts*(rand(npts,1)0.5); +%! y = sin(10*x); +%! stdev = 1e1; +%! y = y + stdev*randn(npts,1); +%! yp = ddmat(x,1)*y; +%! y2p = ddmat(x,2)*y; +%! d = 4; +%! [ys, lambda] = tkrgdatasmooth (x,y,d,"stdev",stdev); +%! lambda +%! ysp = ddmat(x,1)*ys; +%! ys2p = ddmat(x,2)*ys; +%! figure(1); +%! plot(x,y,'o',x,ys) +%! figure(2); +%! plot(x(1:end1),[yp,ysp]) +%! axis([min(x),max(x),min(ysp)abs(min(ysp)),max(ysp)*2]) +%! figure(3) +%! plot(x(2:end1),[y2p,ys2p]) +%! axis([min(x),max(x),min(ys2p)abs(min(ys2p)),max(ys2p)*2]) +%! % +%! % this demo used standard deviation to determine lambda + +%!demo +%! npts = 100; +%! x = linspace(0,1,npts)'; +%! x = x + 1/npts*(rand(npts,1)0.5); +%! y = sin(10*x); +%! stdev = 1e1; +%! y = y + stdev*randn(npts,1); +%! yp = ddmat(x,1)*y; +%! y2p = ddmat(x,2)*y; +%! d = 4; +%! [ys, lambda] = tkrgdatasmooth (x,y,d,"lambda",100); +%! lambda +%! ysp = ddmat(x,1)*ys; +%! ys2p = ddmat(x,2)*ys; +%! figure(1); +%! plot(x,y,'o',x,ys) +%! figure(2); +%! plot(x(1:end1),[yp,ysp]) +%! axis([min(x),max(x),min(ysp)abs(min(ysp)),max(ysp)*2]) +%! figure(3) +%! plot(x(2:end1),[y2p,ys2p]) +%! axis([min(x),max(x),min(ys2p)abs(min(ys2p)),max(ys2p)*2]) +%! % +%! % this demo used a user specified lambda that was too large Added: trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscat.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscat.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscat.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,89 @@ +%%[x, y] = tkrgdatasmscat (xm, ym, lambda) +%%[x, y] = tkrgdatasmscat (xm, ym, lambda, N, d) +%%[x, y] = tkrgdatasmscat (xm, ym, lambda, N, d, range) +%%[x, y, v] = tkrgdatasmscat (...) +%% +%% Smooths the data of the scattered y vs. x values by +%% Tikhonov regularization. +%% Input: +%% xm data series x +%% ym data series y +%% lambda: smoothing parameter +%% N: number of equally spaced smoothed points (default = 100) +%% d: order of smoothing derivative (default = 2) +%% range: two element vector [min,max] giving the desired output range of x; +%% if the range is less than the data, defaults to [min,max] of the data +%% Output: +%% x: smoothed x +%% y: smoothed y +%% v: generalized crossvalidation variance +%% +%% References: Anal. Chem. (2003) 75, 3631; AIChE J. (2006) 52, 325 +%% + +%% Some code addapted with permission from 'whitsmscat', Paul Eilers, 2003 + +%% Copyright (C) 2008 Jonathan Stickel +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +function [x, y, v] = tkrgdatasmscat (xm, ym, lambda, N, d, range) + + %% Defaults if not provided + if (nargin <= 3) + N = 100; + d = 2; + endif + + %% sort the scattered data + [xm,idx] = sort (xm); + ym = ym(idx); + + %% construct x + Nm = length(xm); + if (nargin > 5) + xmin = min(range(1),xm(1)); + xmax = max(range(2),xm(end)); + else + xmin = xm(1); + xmax = xm(end); + endif + L = xmax  xmin; + dx = L/(N1); + x = (xmin:dx:xmax)'; + + %% Itilda is the mapping matrix y>ym + Itilda = speye(N); + idx = round((xm  xmin) / dx) + 1; + Itilda = Itilda(idx,:); + + %% D is the derivative matrix + %%D = ddmat(x,d); + D = dx^(d)*diff(speye(N),d); % equivalent but a little faster + + %% Smoothing + delta = sqrt(trace(D'*D)); % a suitable invariant of D + %%y = (Itilda'*Itilda + lambda*D'*D) \ Itilda'*ym; + C = chol(Itilda'*Itilda + lambda*delta^(1)*D'*D); + y = C \ (C' \ Itilda'*ym); + + %% Computation of hat diagonal and crossvalidation + if (nargout > 2) + %% from AIChE J. (2006) 52, 325 + H = Itilda * ( C \ (C' \ Itilda') ); + %% note: this is variance, squared of the standard error that Eilers uses + v = (ym  Itilda*y)'*(ym  Itilda*y)/Nm / (1  trace(H)/Nm)^2; + endif + +endfunction Added: trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscatwrap.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscatwrap.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/tkrgdatasmscatwrap.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,39 @@ +%%cvestdevdif = tkrgdatasmscatwrap (log10lambda, xm, ym, N, d, range, 'cve''stdev'[, stdev]) +%% +%% Wrapper function for tkrgdatasmscat in order to minimize over lambda +%% w.r.t. crossvalidation error OR the squared difference between the +%% standard deviation of data from the smooth data and the given +%% standard deviation. +%% + +%% Copyright (C) 2008 Jonathan Stickel +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +function out = tkrgdatasmscatwrap (log10lambda, xm, ym, N, d, range, mintype, stdev) + + lambda = 10^(log10lambda); + + if ( strcmp(mintype,"stdev") ) + [x, y] = tkrgdatasmscat(xm, ym, lambda, N, d, range); + dx = (max(x)min(x))/(N1); + idx = round((xm  min(x)) / dx) + 1; + stdevd = std(ymy(idx)); + out = (stdevd  stdev)^2; + else + [x, y, cve] = tkrgdatasmscat(xm, ym, lambda, N, d, range); + out = cve; + endif + +endfunction Added: trunk/octaveforge/main/datasmoothing/inst/tkrgscatdatasmooth.m ===================================================================  trunk/octaveforge/main/datasmoothing/inst/tkrgscatdatasmooth.m (rev 0) +++ trunk/octaveforge/main/datasmoothing/inst/tkrgscatdatasmooth.m 20080402 14:04:01 UTC (rev 4849) @@ 0,0 +1,154 @@ +%%[x, y, lambda] = tkrgscatdatasmooth (xm, ym) +%%[x, y, lambda] = tkrgscatdatasmooth (xm, ym, N, d) +%%[x, y, lambda] = tkrgscatdatasmooth (xm, ym, N, d, range) +%%[x, y, lambda] = tkrgscatdatasmooth (xm, ym, N, d, range, option, value) +%% +%% Determines a smooth curve that approximates the scattered (xm,ym) +%% data values by Tikhonov regularization. The number of points 'N' for +%% the smooth curve and the order of the smoothing derivative 'd' can be +%% provided (defaults are 100 and 2 respectively). Additionally, the +%% desired output range for x ([min,max]) can be given; if the provided +%% range does not completely span the range of the data, the range +%% defaults to the min and max of the data. The optionvalue pair +%% should be either the regularizaiton parameter "lambda" or the +%% standard deviation "stdev" of the randomness in the data. With no +%% option supplied, generalized crossvalidation is used to determine +%% lambda. +%% Reference: Anal. Chem. (2003) 75, 3631. +%% See also: datasmooth +%% + + +%% Copyright (C) 2008 Jonathan Stickel +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; If not, see <http://www.gnu.org/licenses/>;. + + +function [x, y, lambda] = tkrgscatdatasmooth (xm, ym, N, d, range, option, value) + + if (length(xm)!=length(ym)) + error("xm and ym must be equal length vectors") + endif + if ( size(xm)(1)==1 ) + xm = xm'; + endif + if ( size(ym)(1)==1 ) + ym = ym'; + endif + + if (nargin < 3) + N = 100; + d = 2; + endif + if (nargin < 5) + range = [min(xm),max(xm)] + endif + + + guess = 0; + if (nargin > 5) + if ( strcmp(option,"lambda") ) + %% if lambda provided, use it directly + lambda = value; + elseif ( strcmp(option,"stdev") ) + %% if stdev is provided, scale it and use it + stdev = value; + opt = optimset("TolFun",1e6,"MaxFunEvals",20); + log10lambda = fminunc ("tkrgdatasmscatwrap", guess, opt, xm, ym, N, d, range, "stdev", stdev); + lambda = 10^log10lambda; + else + warning("option %s is not recognized; using crossvalidation",option) + endif + else + %% otherwise, perform crossvalidation + opt = optimset("TolFun",1e4,"MaxFunEvals",20); + log10lambda = fminunc ("tkrgdatasmscatwrap", guess, opt, xm, ym, N, d, range, "cve"); + lambda = 10^log10lambda; + endif + + [x,y] = tkrgdatasmscat (xm, ym, lambda, N, d, range); + +endfunction + + +%!demo +%! npts = 80; +%! xm = linspace(0,1,npts)'; +%! stdev = 1e1; +%! xm = xm + stdev*randn(npts,1); +%! ym = sin(10*xm); +%! ym = ym + stdev*randn(npts,1); +%! ymp = ddmat(xm,1)*ym; +%! ym2p = ddmat(xm,2)*ym; +%! [x, y, lambda] = tkrgscatdatasmooth (xm,ym,500,4,[0.15,1.15]); +%! lambda +%! yp = ddmat(x,1)*y; +%! y2p = ddmat(x,2)*y; +%! figure(1); +%! plot(xm,ym,'o',x,y) +%! figure(2); +%! plot(xm(1:end1),ymp,'o',x(1:end1),yp) +%! axis([min(x),max(x),min(yp)abs(min(yp)),max(yp)*2]) +%! figure(3) +%! plot(xm(2:end1),ym2p,'o',x(2:end1),y2p) +%! axis([min(x),max(x),min(y2p)abs(min(y2p)),max(y2p)*2]) +%! % +%! % this demo used generalized crossvalidation to determine lambda + +%!demo +%! npts = 80; +%! xm = linspace(0,1,npts)'; +%! stdev = 1e1; +%! xm = xm + stdev*randn(npts,1); +%! ym = sin(10*xm); +%! ym = ym + stdev*randn(npts,1); +%! ymp = ddmat(xm,1)*ym; +%! ym2p = ddmat(xm,2)*ym; +%! [x, y, lambda] = tkrgscatdatasmooth (xm,ym,500,4,[0.15,1.15],"stdev",stdev); +%! lambda +%! yp = ddmat(x,1)*y; +%! y2p = ddmat(x,2)*y; +%! figure(1); +%! plot(xm,ym,'o',x,y) +%! figure(2); +%! plot(xm(1:end1),ymp,'o',x(1:end1),yp) +%! axis([min(x),max(x),min(yp)abs(min(yp)),max(yp)*2]) +%! figure(3) +%! plot(xm(2:end1),ym2p,'o',x(2:end1),y2p) +%! axis([min(x),max(x),min(y2p)abs(min(y2p)),max(y2p)*2]) +%! % +%! % this demo used standard deviation to determine lambda + +%!demo +%! npts = 80; +%! xm = linspace(0,1,npts)'; +%! stdev = 1e1; +%! xm = xm + stdev*randn(npts,1); +%! ym = sin(10*xm); +%! ym = ym + stdev*randn(npts,1); +%! ymp = ddmat(xm,1)*ym; +%! ym2p = ddmat(xm,2)*ym; +%! [x, y, lambda] = tkrgscatdatasmooth (xm,ym,500,4,[0.15,1.15],"lambda",10000); +%! lambda +%! yp = ddmat(x,1)*y; +%! y2p = ddmat(x,2)*y; +%! figure(1); +%! plot(xm,ym,'o',x,y) +%! figure(2); +%! plot(xm(1:end1),ymp,'o',x(1:end1),yp) +%! axis([min(x),max(x),min(yp)abs(min(yp)),max(yp)*2]) +%! figure(3) +%! plot(xm(2:end1),ym2p,'o',x(2:end1),y2p) +%! axis([min(x),max(x),min(y2p)abs(min(y2p)),max(y2p)*2]) +%! % +%! % this demo used a user specified lambda that was too large This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 