Rank: 1583 based on 92 downloads (last 30 days) and 5 files submitted
photo

Jason Kaeding

E-mail

Personal Profile:
Professional Interests:
Audio, signal processing

 

Watch this Author's files

 

Files Posted by Jason View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
21 Oct 2010 repToSize Replicate and tile an array so that it meets a specified final size. Author: Jason Kaeding repmat, circshift, matrix manipulation 17 2
  • 4.0
4.0 | 1 rating
23 Jul 2010 regexpcmp (strcmp meets regexp) Checks whether strings match a regular expression (pattern) or not. Author: Jason Kaeding strcmp, regexp, strmatch, cellstr, match, string 18 0
02 Mar 2010 sci2num Converts a string with (possibly) an SI prefix to a number. Works in reverse of num2sci. Author: Jason Kaeding si, notation, prefix, units, num2sci 17 3
  • 4.75
4.8 | 4 ratings
02 Mar 2010 num2sci Works just like num2str except will print with formatting in SI prefix notation. Author: Jason Kaeding si, notation, prefix, units, sci2num 21 3
  • 3.5
3.5 | 2 ratings
12 May 2009 HDF5 Read/Write Cellstr Example Demonstrates writing MATLAB cell arrays of strings as variable-length strings to HDF5 files. Author: Jason Kaeding hdf, hdf5, data export, data import 19 1
  • 3.0
3.0 | 1 rating
Comments and Ratings by Jason View all
Updated File Comments Rating
09 Jan 2012 Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean

Very slow. Don't replace the kk loop with parfor as bmv suggests, just vectorize the calculation and get rid of the loop:

dmap(ii+1, jj+1) = sum( 1./ ( (x - xi).^2 + (y - yi).^2 + fudge) );

The other loops can be vectorized as well if you use bsxfun.

10 Jun 2011 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney

I guess it didn't take my first bug submission...

The vertical positioning of the patches is incorrect in the following code:

figure;
area(1:10,rand(10,10))
legendflex(gca,cellstr(num2str(column(1:10))),'ncol',5,'anchor',[6 2],'buffer',[0 -10])

10 Jun 2011 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney

Another bug: if I delete the legend then resize my figure, I get an error...

??? Error using ==> getappdata
Invalid object handle

Error in ==> legendflex>resizefig at 621
Lf = getappdata(ax(ia), 'legflex');

??? Error while evaluating figure ResizeFcn

13 Feb 2011 repToSize Replicate and tile an array so that it meets a specified final size. Author: Jason Kaeding

Appreciate the comment. I guess the idea of this function was that I just needed to fill a matrix with repeated values, not caring about any truncation.

One situation in particular is with color order. Suppose you use 10 different colors on your graph. Now you want 47 curves. To build the new color matrix, I know it doesn't fit, and I just want it to fill it up in order.

In other words, I tend to see a warning as suggesting unanticipated behavior, such as complex data on a plot. Here, the "intended" behavior is to truncate the dimensions. Perhaps an optional output argument would be best where you could get some information back?

[newMatrix,???] = repToSize(...)

17 Aug 2010 Progress Bars Attractive and full-featured progress bars. Author: Richard Stapenhurst

Hi Richard,

Documentation suggestion: you give no example of creating a progress bar manually. I had to look through the methods one by one to figure out what to call.

Additionally, because the set method is typically inherited from the handle class, I completely passed over this method when exploring, causing me to miss THE most important method for using the progress bars. Had I been advising you, I would have suggested using a function name of set_bar or something else to avoid such a name conflict. Nonetheless, because of this I strongly suggest some example in the main help so we can know how to get up and running.

Regards,
Jason

Comments and Ratings on Jason's Files View all
Updated File Comment by Comments Rating
18 Jul 2014 sci2num Converts a string with (possibly) an SI prefix to a number. Works in reverse of num2sci. Author: Jason Kaeding Cobeldick, Stephen

Disclaimer: In the end I could not find any FEX submission that gave the correct outputs for the wide range of test-cases that I tried, so I ended up writing my own function. You can find it here:
http://www.mathworks.com/matlabcentral/fileexchange/33174

18 Jul 2014 sci2num Converts a string with (possibly) an SI prefix to a number. Works in reverse of num2sci. Author: Jason Kaeding Cobeldick, Stephen

This submission is a simple and rugged solution to the problem of converting from an SI prefixed string into a numeric. The code concept is very neat, only failing to convert a few of the strings that I tested with, such as combinations of E-notation and prefixes (eg: '1e3 k' -> NaN), and 'Inf' values that also turn into NaNs. It includes some examples and a nice help section, but no H1 line. There are a few "mlint" messages that need attention, but basically it is a good addition to FEX.

18 Jul 2014 num2sci Works just like num2str except will print with formatting in SI prefix notation. Author: Jason Kaeding Cobeldick, Stephen

Disclaimer: In the end I could not find any FEX submission that gave the correct outputs for the wide range of test-cases that I tried, so I ended up writing my own function. You can find it here:
http://www.mathworks.com/matlabcentral/fileexchange/33174

18 Jul 2014 num2sci Works just like num2str except will print with formatting in SI prefix notation. Author: Jason Kaeding Cobeldick, Stephen

This is a well explained function, with a good help section (though no H1 line), some input checking, plenty of examples, and a rather short "See Also" line. The inclusion of precision control is a plus, although it does not always round in the expected direction: it prefers to round down to '1000' and not up to '1' (eg: 0.99999 -> '1000 m', but should simply be '1 '). The space character (required by the SI standard) is usually present, but goes missing if there is no prefix (eg: 1 -> '1', but should be '1 '). For values with an order > 27, it also just adds more zeros to the string (eg: 1e30 -> '1000000 Y', instead of the simpler '1e30 '). The special-case handling for when a prefix is inside the units could be handy. Overall, it is a well behaved function, let down by being quite slow compared to the others that I tested.

12 Nov 2012 sci2num Converts a string with (possibly) an SI prefix to a number. Works in reverse of num2sci. Author: Jason Kaeding Battistel, Alberto

Contact us