Rank: 79 based on 573 downloads (last 30 days) and 42 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
17 Jan 2013 GetFullPath Full path name for partial or relative path Author: Jan Simon full, name, path, file, qualified, parent directory 42 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 4 0
27 Jul 2012 WinPower Shutdown, sleep, hibernate etc. of Windows computers Author: Jan Simon power, set, shutdown, poweroff, sleep, hibernate 6 0
03 Jul 2012 FileResize Expand and truncate existing files - efficient C-Mex Author: Jan Simon file, resize, truncate, crop, expand 3 0
27 Jun 2012 DataHash MD5 or SHA hash for array, struct, cell or file Author: Jan Simon file, md5, array, struct, hash, sha1 81 14
  • 5.0
5.0 | 7 ratings
Comments and Ratings by Jan View all
Updated File Comments Rating
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.

24 Apr 2013 Cell Array to CSV-file [cell2csv.m] Writes a cell array into a comma separated values text file (*.csv) Author: Sylvain Fiedler

This function has a large potential for improvements:
"var = eval(['cellArray{z,s}']);" could be replaced by the much faster and nicer "v = cellArray{z,s};".
"if size(var, 1) == 0" does not catch [1x0] arrays, while "isempty(v)" would.

Checking the success of FOPEN is strongly recommended to avoid a strange behaviour.

The documentation is sufficient and the function works as advertised.

Comments and Ratings on Jan's Files View all
Updated File Comment by Comments Rating
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

13 Feb 2013 DataHash MD5 or SHA hash for array, struct, cell or file Author: Jan Simon Nath

function handle refering to struct containing the function will create infinite loop. Is there any workaround ?

Exemple:

d= dynamicprops();
addprop(d,'f');
d.f= @(varargin) struct2cell(d);
DataHash(d.f) % infinite loop

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
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 42 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 4 0
27 Jul 2012 WinPower Shutdown, sleep, hibernate etc. of Windows computers Author: Jan Simon power, set, shutdown, poweroff, sleep, hibernate 6 0

Contact us