Rank: 62 based on 958 downloads (last 30 days) and 12 files submitted
photo

Richard Crozier

E-mail
Company/University
The University of Edinburgh

Personal Profile:

 

Watch this Author's files

 

Files Posted by Richard Crozier View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
01 Sep 2014 crobarcro/mcode-cpp-utilities C++ class wrapper and utilities Author: Richard Crozier mex, c, example, class, wrapper 2 0
17 Dec 2013 gapolyfitn optimises the functional form of a multi-dimensional polynomial fit to model data Author: Richard Crozier optimization, linear regression, modelling, genetic algorithm, ga, polynomial 25 3
  • 4.0
4.0 | 1 rating
12 Sep 2013 refactor_fcn_name Change the name of a function called in your m-files and optionally move it too. Author: Richard Crozier refactor, rename 5 0
11 Sep 2013 strrepfile Replace one or more strings in one or more files safely Author: Richard Crozier string replace 6 0
11 Sep 2013 regexprepfile Performs regular expression replacement in a file or files Author: Richard Crozier regexp, regexprep, regular expression, string replace 6 0
Comments and Ratings by Richard Crozier View all
Updated File Comments Rating
14 Oct 2014 IEEE 754r Half Precision floating point converter Converts MATLAB or C variables to/from IEEE 754r Half Precision floating point bit pattern. Author: James Tursa

I had additional issues building on Linux, fist of all gcc assumes files ending in.c are C files, and throws an error because comments are C++ comments. Fixed by changing the file extension to .cpp

Also get a compile error from gcc which can be fixed by calling as:

mex -v CXXFLAGS='$CXXFLAGS -fpermissive' halfprecision.cpp

The problem is with the call to mexCallMATLAB on line 320 which expects the fourth arg (prhs) to be const.

15 Aug 2014 tightfig Remove excess margins from figures. Author: Richard Crozier

@arnold, I'll implement this if you suggest how to identify them. Unfortunately I don't have time to do a lot of research on this right now.

25 Feb 2014 Regression through least square(normal equations) Basic least square algorithm (Normal equations) for regression Author: Koteswar Rao Jerripothula

What's the advantage of this over the many other curve fitting functions on the file exchange?

15 Aug 2013 String comparison The function searches for a string inside a given target and returns 1 for found or 0 for not found. Author: Christian

This can be replaced with

~isempty(strfind(str, substr))

or for your example

>> ~isempty(strfind('Marc goes fishing', 'goes'))

ans =

1

strfind also works for cell arrays

>> strfind({'Marc goes fishing', 'banafdsafas'}, 'goes')

ans =

[6.0000e+000] []

so could be adapted for your other use cases. It will be much faster than your loopy code, which is also inefficient in other ways.

12 Jun 2013 Euclidean distance Calculate euclidean distance Author: wadzapi

John D'Errico's ipdm does this much better:

http://www.mathworks.co.uk/matlabcentral/fileexchange/18937-ipdm-inter-point-distance-matrix

Comments and Ratings on Richard Crozier's Files View all
Updated File Comment by Comments Rating
04 Dec 2014 tightfig Remove excess margins from figures. Author: Richard Crozier pietro

It works fine but not when the figures are docked because it modifies the figure properties and not the axis ones. Anyway it is a great function. Hopefully it will work also when the figure are docked.

05 Nov 2014 tightfig Remove excess margins from figures. Author: Richard Crozier Thomas Edwards

I had a colorbar addded to my figure of multiple subplots. The annoying thing was that the exponent of the colorbar was cut-off on the edge of the figure. Using tightfig fixed this for me so that the exponent would fit in the figure. Very useful!

01 Oct 2014 tightfig Remove excess margins from figures. Author: Richard Crozier João

Great. Although it sometimes clips the edges off fonts that are really close to the limits (I was not able to understand in which conditions it does this, but it happened unfrequently)

25 Sep 2014 tightfig Remove excess margins from figures. Author: Richard Crozier Daniel

04 Sep 2014 tightfig Remove excess margins from figures. Author: Richard Crozier arnold

it doesn't take into account an xlabel of a boxplot. Just cuts it away. Ylabel seems fine though.

Contact us