Rank: 26139 based on downloads (last 30 days) and 0 files submitted
photo

Christian Dorion

E-mail
Company/University
Desautels Faculty of Management

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Christian View all
Updated File Comments Rating
13 Oct 2009 Performing random numbers generator from a generic discrete distribution This function extracts random numbers distributed over a discrete set; the PDF is user-defined Author: Gianluca Dorini

Hi,
  Thanks for sharing this file. I suggest you replace the hardcoded 32767 by RAND_MAX... Otherwise it works like a charm.

21 Apr 2009 export_fig Exports figures nicely to a number of vector & bitmap formats. Author: Oliver Woodford

Great piece of work, thanks.

A minor thing though... Under my installation, the private/ghostscript.m function had a minor bug that resulted in the whole function being whipped out and replaced by solely the 'gs' path. Just in case it happens to anyone else, here is a simple patch:

--- MY/private/ghostscript.m
+++ ONLINE/private/ghostscript.m
@@ -103,9 +103,8 @@
 fstrm = fread(fh, '*char')';
 fclose(fh);
 % Find the path
-first_sec = regexp(fstrm, '[\n\r]*function path = current_gs_path[\n\r]*path = ''', 'end', 'once');
-second_sec = first_sec + regexp(fstrm(first_sec+1:end), ''';[\n\r]*return', 'once');
-assert(~isempty(first_sec) && ~isempty(second_sec));
+first_sec = regexp(fstrm, '[\n\r]function path = current_gs_path[\n\r]path = ''', 'end', 'once');
+second_sec = first_sec + regexp(fstrm(first_sec+1:end), ''';[\n\r]return', 'once');
 % Save the file with the path replaced
 fh = fopen(fname, 'wt');
 fprintf(fh, '%s%s%s', fstrm(1:first_sec), path, fstrm(second_sec:end));

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com