(New page: Here you can find relevant information on how to implement Pattern Recognition projects using Scilab. '''Brief Introduction to Scilab''' `Scilab <http://www.scilab.org>`_ is a open-so...)
 
Line 1: Line 1:
Here you can find relevant information on how to implement Pattern Recognition projects using Scilab.  
+
Here you can find relevant information on how to implement Pattern Recognition projects using Scilab.
  
  
Line 5: Line 5:
  
  
`Scilab <http://www.scilab.org>`_ is a open-source Matlab-like tool developed at INRIA. It can be downloaded for several platforms from the link:  
+
`<a href "http://www.scilab.org">Scilab</a> is a open-source Matlab-like tool developed at INRIA. It can be downloaded for several platforms from the link:
  
 
http://www.scilab.org/download/
 
http://www.scilab.org/download/
Line 24: Line 24:
 
- '''Random Number Generator''': grand is the function used to generate random numbers. In order to generate a multivariate normally distributed sequence of *n* vectors with mean *mu* and covariance *cov*, grand should be called as:
 
- '''Random Number Generator''': grand is the function used to generate random numbers. In order to generate a multivariate normally distributed sequence of *n* vectors with mean *mu* and covariance *cov*, grand should be called as:
  
    numbers = grand(n, 'mn',mu, cov);  
+
numbers = grand(n, 'mn',mu, cov);
  
  
Line 30: Line 30:
 
- '''Function declaration''': example that computes the multivariate normal probability density:
 
- '''Function declaration''': example that computes the multivariate normal probability density:
  
::  
+
::
  
  
  // function to compute the multivariate normal distribution  
+
// function to compute the multivariate normal distribution
  //note that it asks for the sigma inverse, as well as the Sigma's determinant
+
//note that it asks for the sigma inverse, as well as the Sigma's determinant
  function [g] = MultivariateNormalDensity(x,mu, sigma_inv, sigma_det)
+
function [g] = MultivariateNormalDensity(x,mu, sigma_inv, sigma_det)
    d=length(x);
+
d=length(x);
    r2 = (x-mu)'*sigma_inv*(x-mu);
+
r2 = (x-mu)'*sigma_inv*(x-mu);
    factor = 1/sqrt(((2*%pi)^d)*sigma_det);
+
factor = 1/sqrt(((2*%pi)^d)*sigma_det);
    g = factor * exp (-(1/2)*r2);
+
g = factor * exp (-(1/2)*r2);
  endfunction
+
endfunction
+
 
  
 
The file with the code above can be downloaded from the link below:
 
The file with the code above can be downloaded from the link below:
  
!`MultivariateNormalDensity.sci`__  
+
!`MultivariateNormalDensity.sci`__
  
 
__ MultivariateNormalDensity.sci
 
__ MultivariateNormalDensity.sci

Revision as of 17:53, 19 March 2008

Here you can find relevant information on how to implement Pattern Recognition projects using Scilab.


Brief Introduction to Scilab


`<a href "http://www.scilab.org">Scilab</a> is a open-source Matlab-like tool developed at INRIA. It can be downloaded for several platforms from the link:

http://www.scilab.org/download/

Tutorials describing how to use Scilab can be found here:

Homework #1 related functionality


- Random Number Generator: grand is the function used to generate random numbers. In order to generate a multivariate normally distributed sequence of *n* vectors with mean *mu* and covariance *cov*, grand should be called as:

numbers = grand(n, 'mn',mu, cov);


- Function declaration: example that computes the multivariate normal probability density:


// function to compute the multivariate normal distribution //note that it asks for the sigma inverse, as well as the Sigma's determinant function [g] = MultivariateNormalDensity(x,mu, sigma_inv, sigma_det) d=length(x); r2 = (x-mu)'*sigma_inv*(x-mu); factor = 1/sqrt(((2*%pi)^d)*sigma_det); g = factor * exp (-(1/2)*r2); endfunction


The file with the code above can be downloaded from the link below:

!`MultivariateNormalDensity.sci`__

__ MultivariateNormalDensity.sci

Tool Boxes

There are several *tool boxes* of functions written by people all over the world adding extra functionality to Scilab. Here are some useful links:


Scilab Code

All the relevant code for the EE662 course written in Scilab is posted below:

!`MultivariateNormalDensity.sci`__ - Implementation of a function to compute the multivariate normal density

__ MultivariateNormalDensity.sci

Alumni Liaison

has a message for current ECE438 students.

Sean Hu, ECE PhD 2009