Rank: 1346 based on 99 downloads (last 30 days) and 3 files submitted
photo

Christian Kothe

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Christian Kothe View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
26 Jan 2012 Fast serialize/deserialize These functions can serialize most MATLAB data structures into a byte vector and vice versa. Author: Christian Kothe serialize, export, import 64 9
  • 4.88889
4.9 | 9 ratings
19 Jan 2012 Fast moving average A fast implementation of the moving average filter for long kernels. Author: Christian Kothe statistics, signal processing 28 4
  • 5.0
5.0 | 3 ratings
12 Jan 2012 Micro-cache: memoize/cache function results A simple helper to avoid re-calculating the same results repeatedly. Author: Christian Kothe optimization 7 0
Comments and Ratings by Christian Kothe View all
Updated File Comments Rating
16 Jan 2012 Interface to a LBFGS solver Matlab interface to a LBFGS-code for solving unconstrained minimization problems. Author: Arne Vagren

Compiling this on a more or less vanilla Linux GCC setup through mex brought up a couple of issues for me:

* lbfgs_.c uses C++-style "//" comments, which gets the compiler enraged (I changed these to C-style)

* on non-MSVC platforms you'd need to also define HAVE_XMMINTRIN_H and HAVE_EMMINTRIN_H to get SSE to work (otherwise the relevant headers are not included by liblbfgs)

* liblbfgs uses the "inline" keyword which is not defined on my OS (while __inline is). I added the following to each of the arithmetic_*.h files:

#ifndef inline
#ifdef __inline
#define inline __inline
#else
#define inline
#endif
#endif

I think the latter 2 issues come up because liblbfgs relies on the automake / config.h mechanism to define the relevant macros/identifiers.

The following mex line then compiles it for me:

mex -DHAVE_EMMINTRIN_H -DHAVE_XMMINTRIN_H -DUSE_SSE -I"liblbfgs-1.10/include" -largeArrayDims lbfgs_.c liblbfgs-1.10/lib/lbfgs.c

16 Jan 2012 Fast moving average A fast implementation of the moving average filter for long kernels. Author: Christian Kothe

Thanks for spotting the scalar-X issue, Jan! Fixed now.

Also, you're right -- for N<500 (or so) filter is in fact faster. So this case is now covered by calling filer.

This code has been written to handle N>10000 (and length(X)>1000000) at decent speeds.

Comments and Ratings on Christian Kothe's Files View all
Updated File Comment by Comments Rating
17 Nov 2014 Fast moving average A fast implementation of the moving average filter for long kernels. Author: Christian Kothe Joren

This does exactly what I needed it to do at a much faster pace than what I was using. Thank you!

10 Sep 2014 Fast moving average A fast implementation of the moving average filter for long kernels. Author: Christian Kothe Salaheddin Hosseinzadeh

08 May 2014 Fast serialize/deserialize These functions can serialize most MATLAB data structures into a byte vector and vice versa. Author: Christian Kothe Ralph Coleman

In deserialize_object, you should distinguish between graphical handles and handles to objects defined with classdef. I modified the code in the following way to get it to work:
if ishandle(v)
set(v,fn{1},conts.(fn{1}));
else
v.(fn{1}) = conts.(fn{1});
end

20 Mar 2014 Fast serialize/deserialize These functions can serialize most MATLAB data structures into a byte vector and vice versa. Author: Christian Kothe Jan

Unfortunetaly, I cannot save my save file. Using '-v7.3', it needs about one minute to save (filesize is about 300MB). When I try to serialize the data, after lots of warnings "Calling STRUCT on an object ..." I get an OUT OF MEMORY Error.

My Save object consists of several (handle) objects and is, as I said, about 300MB in size when saved with '-v7.3'.

Is there anything I can do? (My Computer is win7 32bit with 3gb ram)

Thanks in advance!

Jan

01 Mar 2014 Fast serialize/deserialize These functions can serialize most MATLAB data structures into a byte vector and vice versa. Author: Christian Kothe Andrew Champion

Great tool, but there is a bug I encountered that may also be the underlying cause of Mahdi's problems. In deserialization of horizontal string cell arrays, hlp_deserialize.m:246, the string splitting loop should be

for 1:length(splits)-1

not how it currently is written,

for 1:length(lengths)

As it's currently written it will not properly deserialize multidimensional horizontal string cell arrays.

Contact us