Rank: 112 based on 670 downloads (last 30 days) and 12 files submitted
photo

Richard Crozier

E-mail
Company/University
The University of Edinburgh

Personal Profile:
Professional Interests:
Electrical Engineering, Renewable Energy

 

Watch this Author's files

 

Files Posted by Richard 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 5 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 40 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 12 0
11 Sep 2013 strrepfile Replace one or more strings in one or more files safely Author: Richard Crozier string replace 12 0
11 Sep 2013 regexprepfile Performs regular expression replacement in a file or files Author: Richard Crozier regexp, regexprep, regular expression, string replace 12 0
Comments and Ratings by Richard 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's Files View all
Updated File Comment by Comments Rating
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.

28 Aug 2014 tightfig Remove excess margins from figures. Author: Richard Crozier Greene, Chad

I use this frequently; thanks for sharing. I recommend adding this to the end of the function to suppress unwanted outputs:

if nargout==0; clear hfig; end

24 Aug 2014 Goodness of Fit (Modified) Computes goodness of fit for regression model given matrix/vector of target and output values. Author: Richard Crozier Ricardo

Very useful and well written function. Thanks.

Contact us