Rank: 528 based on 118 downloads (last 30 days) and 9 files submitted
photo

Stephen Cobeldick

E-mail

Personal Profile:

Electronic hardware design and development, modelling (from first principles) of generators and associated power management systems.

Professional Interests:

 

Watch this Author's files

 

Files Posted by Stephen View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Jul 2013 Screenshot Numeric to Integer+Ordinal Character Array Convert numeric values to a character array of integers with ordinal suffixes. Author: Stephen Cobeldick ordinal, suffix, int2str, num2str, cardinal, vectorize 9 0
18 Jul 2013 Screenshot Parallel / Series Component Selector Resistor/Capacitor/Inductor components for a parallel/series circuit nearest to the desired value. Author: Stephen Cobeldick parallel circuit, series circuit, passive components, equivalent circuit, resistor, capacitor 13 0
18 Jul 2013 Screenshot Round to Electronic Component Values Round numeric element values to IEC 60063 (E-Series) component values. Author: Stephen Cobeldick preferred number, preferred value, rounding, value, resistor, capacitor 14 2
  • 5.0
5.0 | 2 ratings
18 Jul 2013 Screenshot Rounding Functions Collection All the rounding functions you will ever need: round to even, significant figures, decimal places... Author: Stephen Cobeldick rounding, numeric, data, significant figures, decimal places, finance 25 0
08 Jul 2013 Round Serial Date Numbers or Date Vectors Round Serial Date Numbers or Date Vectors to the nearest desired unit (round/floor/ceiling). Author: Stephen Cobeldick date vector, date number, rounding, round, floor, ceiling 20 1
  • 5.0
5.0 | 1 rating
Comments and Ratings by Stephen View all
Updated File Comments Rating
28 Jul 2013 Beautiful and distinguishable line colors + colormap Plot lots of lines with very distinguishable and aesthetically pleasing colors. Works for 'N' colors Author: Jonathan C. Lansey

Fix the above example: use of a colormap with multiline plots can be achieved by setting the 'ColorOrder' axes property:

N = 5;
axes('NextPlot','replacechildren', 'ColorOrder',cell2mat(linspecer(N)))
X = linspace(0,pi*3,1000);
Y = bsxfun(@(x,n)sin(x+2*n*pi/N), X.', 1:N);
plot(gca, X,Y, 'linewidth',5)

11. The M-file help section should include a 'See also ...' line, to link to similar and associated functions.
12. Distributing the colorbrewer scheme requires including a copy of the original Apache copyright license.

26 Jul 2013 Beautiful and distinguishable line colors + colormap Plot lots of lines with very distinguishable and aesthetically pleasing colors. Works for 'N' colors Author: Jonathan C. Lansey

I have been looking for better looking, distinguishable colormaps to replace the standard ones, which at first this file seemed to offer. However this is not a drop in replacement colormap, and the M-file has multiple drawbacks, which detract from the idea:
1. Non-standard cell array output: all standard MATLAB colormaps return an Nx3 numeric matrix.
2. Non-standard default size of 255: the standard MATLAB colormaps use the current colormap size (very useful!).
3. No H1 line in the help.
4. Running mlint gives eight messages for code improvement.
5. The example does not work without the addition of extra code.
6. Calls slow functions like "exist" when "nargin" would suffice.
7. Unnecessary "for" loops could be vectorized (especially if returning the standard numeric colormap).
8. No array preallocation within the "for" loops.
9. Unnecessary use of "varargin" when a simple second input would be adequate.
10. Example shows poor use of MATLAB plot command. Compare to the code below, in half the number of lines:
N = 5;
colormap(cell2mat(linspecer(N)));
X = linspace(0,pi*3,1000);
Y = bsxfun(@(x,n)sin(x+2*n*pi/N), X.', 1:N);
plot(X,Y,'linewidth',5)

Comments and Ratings on Stephen's Files View all
Updated File Comment by Comments Rating
16 Apr 2013 Round Serial Date Numbers or Date Vectors Round Serial Date Numbers or Date Vectors to the nearest desired unit (round/floor/ceiling). Author: Stephen Cobeldick Harris, Jeff

Nicely done. It is useful to have a time rounding fn to determine if times are equal within a tolerance, especially if they may have lost significant digits.

02 Apr 2012 Round to Electronic Component Values Round numeric element values to IEC 60063 (E-Series) component values. Author: Stephen Cobeldick CIMADURE, Ronan

Nice function , all I want ! :)

29 Mar 2012 Round to Electronic Component Values Round numeric element values to IEC 60063 (E-Series) component values. Author: Stephen Cobeldick DS

Nice idea. Clearly documented and well-commented code. This should come in handy for circuit design.

Top Tags Applied by Stephen
finance, rounding, timestamp, calendar date, capacitor
Files Tagged by Stephen View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Jul 2013 Screenshot Numeric to Integer+Ordinal Character Array Convert numeric values to a character array of integers with ordinal suffixes. Author: Stephen Cobeldick ordinal, suffix, int2str, num2str, cardinal, vectorize 9 0
18 Jul 2013 Screenshot Parallel / Series Component Selector Resistor/Capacitor/Inductor components for a parallel/series circuit nearest to the desired value. Author: Stephen Cobeldick parallel circuit, series circuit, passive components, equivalent circuit, resistor, capacitor 13 0
18 Jul 2013 Screenshot Round to Electronic Component Values Round numeric element values to IEC 60063 (E-Series) component values. Author: Stephen Cobeldick preferred number, preferred value, rounding, value, resistor, capacitor 14 2
  • 5.0
5.0 | 2 ratings
18 Jul 2013 Screenshot Rounding Functions Collection All the rounding functions you will ever need: round to even, significant figures, decimal places... Author: Stephen Cobeldick rounding, numeric, data, significant figures, decimal places, finance 25 0
08 Jul 2013 Round Serial Date Numbers or Date Vectors Round Serial Date Numbers or Date Vectors to the nearest desired unit (round/floor/ceiling). Author: Stephen Cobeldick date vector, date number, rounding, round, floor, ceiling 20 1
  • 5.0
5.0 | 1 rating

Contact us