Rank: 71 based on 626 downloads (last 30 days) and 43 files submitted
photo

Jan Simon

E-mail
Company/University
University Heidelberg
Lat/Long
49.41804, 8.671068

Personal Profile:

Computers assist human.
I do not answer to emails related to questions of the Answers forum.

Professional Interests:
Motion analysis, physics, orthopedics

 

Watch this Author's files

 

Files Posted by Jan View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
21 May 2013 Screenshot RunLength RunLength coding as fast MEX and M-code Author: Jan Simon runlength, coding, code, rle, communications 7 0
17 Jan 2013 GetFullPath Full path name for partial or relative path Author: Jan Simon full, name, path, file, qualified, parent directory 44 15
  • 5.0
5.0 | 9 ratings
08 Oct 2012 Limit figure size Set minimal or maximal size of a figure Author: Jan Simon figure, size, resize, maximum, minimum, java 5 0
27 Jul 2012 WinPower Shutdown, sleep, hibernate etc. of Windows computers Author: Jan Simon power, set, shutdown, poweroff, sleep, hibernate 8 0
03 Jul 2012 FileResize Expand and truncate existing files - efficient C-Mex Author: Jan Simon file, resize, truncate, crop, expand 4 0
Comments and Ratings by Jan View all
Updated File Comments Rating
23 May 2013 User To estimate range of user Author: Lanang Prayogo

This is a script with the brute "clear all" header, which deletes results of former work and all break points. Anything, which impedes debugging, is a bad programming pattern.

There is no useful documentation in this program. Therefore it is hard to guess the purpose. In combination with the hard-coded set of parameters, which will very likely not match the needs of other users, this program is neither useful nor usable.

I suggest to formulate it as a function, add an ehaustive explanation as help text, commenting the algorithm and defining all parameters as inputs. Then I will rate this function higher.

18 May 2013 Euclidean Distance The Euclidean distance between points p and q is the length of the line segment connecting them. Author: Daniel Bromand

You have removed your former submission and re-submitted it again with modifications. This procedure removed my comment also. Therefore I post it again:

Now you method to calculate the distance is more efficient. But you still define the inputs as matrices and reshape them to vectors afterwards. Is there any reason, why you do not define them as vectors directly?

It is still not clear why you assume, that this code is useful for others. A script with fixed inputs is not flexible. Converting this to a function would not be very useful also, because the built-in norm() command or the line
sqrt(sum((P_1D - Q_1D) .^ 2))
would be fast and clear already.

Therefore I still think, that this submission is neither useful nor usable.

17 May 2013 TransposeMat - like transpose, but handles N-D arrays Transposes the rows/columns (only) on any N-dimensional array Author: Chad Webb

This would be a more compact one-liner:

out = permute(in, [2, 1, 3:ndims(in)]);

03 May 2013 Max filter This code is used for max filter Author: Dhaval Gondaliya

This script starts with the brute clearing header "clc; clear all; close all;". This is a bad idea, because "clear all" deletes all breakpoints. Impeding the debugging is a very bad idea.

The algorithm is slow: The builtin function MAX is much faster than SORT and selecting the last element.
Expressions line "[d(i-1,j-1) d(i-1,j) d(i-1,j+1) d(i,j-1) d(i,j) d(i,j+1) d(i+1,j-1) d(i+1,j) d(i+1,j+1)]" can be accelerated: "d(i-1:i+1,j-1:j+1)".
The construction of "m=(1/9)*(ones(3,3));" can be omitted, because "m" is not used anywhere.

A function with inputs and outputs would be more useful than this script, which obtains the image by UIGETFILE. Without any comments and documentation the usability of this code is very low.

26 Apr 2013 Default arguments Set default values for optional function input. Author: Bas-Jan

What do you expect as result of this line:
varargin = varargin{:};
I assume, it should be deleted to avoid errors.
The code can be simplified:
varargout = defaults;
n = min(numel(defaults), numel(varargin));
varargout(1:n) = varargin(1:n);
if nargin > n
% error instead of a warning
end
An error is much more reliable than a warning, which will be overseen when a mutli-million line program fils the command window with status messages.

Comments and Ratings on Jan's Files View all
Updated File Comment by Comments Rating
24 May 2013 CStr2String Fast concatenation of cell strings to a string as C-Mex Author: Jan Simon Luong, Bruno

MATLAB cell concatenation is extremely slow. Jan's FEX is a must for those who care about speed.

17 May 2013 DGradient Gradient of arrays as fast C-Mex Author: Jan Simon SN

Great Job! thanks.

15 Apr 2013 DateStr2Num Convert date string to date number - CMex: much faster than DATENUM Author: Jan Simon Farrahi Moghaddam, Reza

06 Mar 2013 GetFullPath Full path name for partial or relative path Author: Jan Simon Tadepalli, Vinay Kumar

28 Feb 2013 VChooseK Choose K elements from a vector - MEX: 100 times faster than NCHOOSEK Author: Jan Simon Iliopoulos, Alexandros

Top Tags Applied by Jan
cmex, mex, string, file, statistics
Files Tagged by Jan View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
21 May 2013 Screenshot RunLength RunLength coding as fast MEX and M-code Author: Jan Simon runlength, coding, code, rle, communications 7 0
18 Mar 2013 Screenshot Hatched Lines and Contours Draw lines and contours with hatches on one side of the line. Author: Rob McDonald hatch, constraint, plotting, contour, optimization 12 0
  • 5.0
5.0 | 1 rating
17 Jan 2013 GetFullPath Full path name for partial or relative path Author: Jan Simon full, name, path, file, qualified, parent directory 44 15
  • 5.0
5.0 | 9 ratings
17 Jan 2013 BSD/Linux Host Information and matlabpoolPlus Get information about the host on which the Matlab instance is running. Also provides matlabpoolPlus Author: Boris Schauerte unix, bsd, linux, host information, uname, process id 4 0
08 Oct 2012 Limit figure size Set minimal or maximal size of a figure Author: Jan Simon figure, size, resize, maximum, minimum, java 5 0

Contact us