Rank: 671 based on 165 downloads (last 30 days) and 6 files submitted
photo

Gianluca Dorini

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Files Posted by Gianluca View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
01 Nov 2008 Screenshot Dynamic Programming solver for The bridge crossing problem The bridge crossing problem is here modelled and solved as undiscounted Dynamic Programming problem. Author: Gianluca Dorini dynamic programming, optimization 21 1
  • 3.0
3.0 | 1 rating
16 Nov 2007 Screenshot Copernic Desktop Search functions for Matlab Two functions for submitting search queries to Copernic Desktop Search and retrieving results. Author: Gianluca Dorini external interface, copernic desktop sear... 10 0
04 Jun 2007 Screenshot Performing Pareto set membership tester for sets of points in K-dimensions This fast function takes as input a sets of points, and determines which ones are Pareto optimal Author: Gianluca Dorini pareto membership, pareto, multi, optimization, multiobjective 29 5
  • 4.33333
4.3 | 4 ratings
03 Apr 2007 Screenshot 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 discrete pdf, statistics, probability, random numbers 32 5
  • 4.5
4.5 | 2 ratings
01 Apr 2007 Screenshot Practical Monte Carlo Simulation Tool Monte Carlo Simulation for generic Matlab commands Author: Gianluca Dorini statistics, monte carlo simulatio..., probability, random process 59 2
  • 3.0
3.0 | 1 rating
Comments and Ratings on Gianluca's Files View all
Updated File Comment by Comments Rating
11 Nov 2009 Performing Pareto set membership tester for sets of points in K-dimensions This fast function takes as input a sets of points, and determines which ones are Pareto optimal Author: Gianluca Dorini Matteo

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 Dorion, Christian

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

11 Sep 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 Pozzi, Francesco

I've tried this small experiment:

N = 100000; % sample size
w = 1:100; % quite steep distribution
w = w / sum(w); % distribution (pdf)
Y_std = sqrt(w .* (1 - w)); % Standard deviations associated to each probability

%%%%%%%%%%%%%%%%%

Y1 = randp(w, N, 1); % Try Jos function
Y1_w = histc(Y1, [1:100]); % absolute frequencies table
Y1_w = Y1_w / N; % transform into relative frequencies
Y1_w_std = sqrt(Y1_w .* (1 - Y1_w)); % Empirical standard deviations associated to each probability

%%%%%%%%%%%%%%%%%

Y2 = gDiscrPdfRnd(w, N, 1); % Try Gianluca Dorini's function
Y2_w = histc(Y2, [1:100]); % absolute frequencies table
Y2_w = Y2_w / N; % transform into relative frequencies
Y2_w_std = sqrt(Y2_w .* (1 - Y2_w)); % Empirical standard deviations associated to each probability

%%%%%%%%%%%%%%%%%

% Check if empirical standard deviations are coherent with theretical ones
plot(Y_std - Y1_w_std', '.b') % plot empirical differences for Jos function
hold on
plot(Y_std - Y2_w_std', '.r') % plot empirical differences for Gianluca Dorini's function

%%%%%%%%%%%%%%%%%

It looks as though both functions statistically behave very well. They are both excellent functions. Thank you.

30 Mar 2009 hypersphere n-dimensional hypersphere in parametric coordinates. Author: Gianluca Dorini MathMoose

30 Mar 2009 hypersphere n-dimensional hypersphere in parametric coordinates. Author: Gianluca Dorini MathMoose

Kinda slow for large dimensions due to the for loop.

Input and output are actually a matrix of column vectors, not row vectors as stated in the documentation. (matrix dimensions are usually row x column, not column x row)

Faster version ** (note this doesn't produce the exact same output as the original HyperSphere.m function, see below):
function Y = HyperSphere2(X,r=1)
% compute the cartesian coordinates from the input
% hypersphere angles and radius

% n = number of column vectors
n = size(X,2);

% cosine terms
C = [cos(X); ones(1,n)];
% sine terms
S = [ones(1,n); cumprod(sin(X),1)];
% calculate output
Y = r * C .* S;

=========
This version produces the same output as the original HyperSphere
.m (swapping the sines and cosines, and change the order of the vectors)
function Y = HyperSphere2(X,r=1)
% compute the cartesian coordinates from the input
% hypersphere angles and radius

% dimension of the input vectors
m = size(X,1);
% number of input vectors
n = size(X,2);

% reverse the order of X
X = X(m:-1:1,:);

% sine terms
S = [sin(X); ones(1,n)];
% cosine terms
C = [ones(1,n); cumprod(cos(X),1)];
% calculate output
Y = r * C .* S;

% reverse the order of Y
Y = Y(m+1:-1:1,:);

Top Tags Applied by Gianluca
optimization, probability, statistics, cartesian, copernic desktop search desktop search engine com
Files Tagged by Gianluca View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
01 Nov 2008 Screenshot Dynamic Programming solver for The bridge crossing problem The bridge crossing problem is here modelled and solved as undiscounted Dynamic Programming problem. Author: Gianluca Dorini dynamic programming, optimization 21 1
  • 3.0
3.0 | 1 rating
16 Nov 2007 Screenshot Copernic Desktop Search functions for Matlab Two functions for submitting search queries to Copernic Desktop Search and retrieving results. Author: Gianluca Dorini external interface, copernic desktop sear... 10 0
04 Jun 2007 Screenshot Performing Pareto set membership tester for sets of points in K-dimensions This fast function takes as input a sets of points, and determines which ones are Pareto optimal Author: Gianluca Dorini pareto membership, pareto, multi, optimization, multiobjective 29 5
  • 4.33333
4.3 | 4 ratings
03 Apr 2007 Screenshot 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 discrete pdf, statistics, probability, random numbers 32 5
  • 4.5
4.5 | 2 ratings
01 Apr 2007 Screenshot Practical Monte Carlo Simulation Tool Monte Carlo Simulation for generic Matlab commands Author: Gianluca Dorini statistics, monte carlo simulatio..., probability, random process 59 2
  • 3.0
3.0 | 1 rating
 

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