Rank: 2132 based on 55 downloads (last 30 days) and 6 files submitted
photo

Benjamin Kraus

E-mail
Company/University
Boston University
Lat/Long
42.34835, -71.1008

Personal Profile:

 

Watch this Author's files

 

Files Posted by Benjamin Kraus View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
10 Jun 2013 readPLXFileC A MEX function to read a PLX data file (Plexon, Inc.). Author: Benjamin Kraus plexon, plx, fread 9 1
  • 4.0
4.0 | 1 rating
10 Jun 2013 matwho Quickly list the variables in the specified .MAT file. Author: Benjamin Kraus mat, who, matgetdir, potw, pick of the week 6 0
28 May 2013 nanconv Convolution in 1D or 2D ignoring NaNs and (optionally) correcting for edge effects. Author: Benjamin Kraus conv, conv2, nan 11 0
28 May 2013 Screenshot nantowhite Convert a 2D matrix into an image with NaNs replaced by white Author: Benjamin Kraus image, imagesc, colormap, nan, transparency, alpha 9 0
28 May 2013 nanconvn Convolution in ND ignoring NaNs and (optionally) correcting for edge effects. Author: Benjamin Kraus conv, conv2, convn, nan 4 0
Comments and Ratings by Benjamin Kraus
Updated File Comments Rating
17 Sep 2010 Notifier Notify you via email or text message when your functions finish or crash. Author: Benjamin Kraus

@Jiro: The first call to SENDMAIL is intended to fail and stop execution if SENDMAIL is not configured properly. This is a sanity check so that you find out immediately that SENDMAIL isn't working correctly, rather than four hours later when your script ended after an hour and you have no idea why you were never notified. If you start the script, you will either notice immediately that SENDMAIL returned an error, or you will never get the "Start" notification, and know something is amiss.

Comments and Ratings on Benjamin Kraus' Files View all
Updated File Comment by Comments Rating
13 Nov 2014 Notifier Notify you via email or text message when your functions finish or crash. Author: Benjamin Kraus Kelly Kearney

Very nice function. I found that my text messages were often truncated when using this with anonymous functions with a large number of input parameters, so I added the following few lines to allow a function nickname to be used in the subject line of emails/texts:

if iscell(fh)
fhname = fh{2}; % nickname
fh = fh{1}; % function handle
else
fhname = func2str(fh);
end

02 Sep 2014 readPLXFileC A MEX function to read a PLX data file (Plexon, Inc.). Author: Benjamin Kraus Kangning

Thank you for submission

29 Sep 2010 Notifier Notify you via email or text message when your functions finish or crash. Author: Benjamin Kraus Jiro Doke

Ah, good thinking. I understand and like the rationale.

17 Sep 2010 Notifier Notify you via email or text message when your functions finish or crash. Author: Benjamin Kraus Benjamin Kraus

@Jiro: The first call to SENDMAIL is intended to fail and stop execution if SENDMAIL is not configured properly. This is a sanity check so that you find out immediately that SENDMAIL isn't working correctly, rather than four hours later when your script ended after an hour and you have no idea why you were never notified. If you start the script, you will either notice immediately that SENDMAIL returned an error, or you will never get the "Start" notification, and know something is amiss.

17 Sep 2010 Notifier Notify you via email or text message when your functions finish or crash. Author: Benjamin Kraus Jiro Doke

Oops, clicked on submit before leaving a comment.

Very nice idea and well-coded (and documented). One suggestion. You put a try-catch around the second and third call to SENDMAIL, but not the first. I suggest making a subfunction for the call to SENDMAIL that includes the try-catch, and call that subfunction in the three locations.

Contact us