image thumbnail

2D random paths generator integrating leg's contraints

by

 

14 Aug 2008 (Updated )

Generates random 2D leg'paths from departure to arrival integrating leg's constraints

exclusion.m
function I = exclusion(I , exclu , val)

% Discard from Adjacency matrix I (D x S) all states indexed by vector exclu.
%
% Usage
% ------
%
% I = exclusion(I , exclu , [val]);
%
% Inputs 
% ------
%
% I            Adjacency matrix (D x S)
% exclu        States index vector to discard from I
% val          Replace value (default = 0)
%
%
% Output 
% ------
%
% I            Updated Adjacency Matrix (D x S)
%
%
% Example 
% -------
% 
% I     = indice_ij(4 , 4);
% exclu = [3 8 11];
% I1    = exclusion(I , exclu);
%
%
%
% Author          Sbastien PARIS (sebastien.paris@lsis.org)
% -------




if (nargin <3)
   
   val = 0;
   
end


I(ismember(I , exclu)) = val;



   
   

Contact us