New Scientific Features in 2011
Contents

New Scientific Features in 2011
 New Computational Features in Scilab 5.3.1
 6th of January 2011: scibench
 21st of January 2011: NaNToolbox v1.2
 6th of February 2011: Regression tools
 16th of February 2011: AG_fluid_dynamics
 3rd of March 2011: Wavelab v1.0
 8th of March 2011: Particle Swarm Optimization Toolbox, v0.2
 15th of March 2011: FreeASM
 23rd of March 2011: Crystal Structure Animation v2.0
 25th of March 2011: Low Discrepancy Sequences v0.2
 27th of April 2011: Matrix Market v1.4
 6th of June 2011: Linear Algebra v0.1
 8th of June 2011: Mathieu functions v2.0
 20th of July 2011: New Module: NIST Datasets v0.2
 27th of July 2011: CelestLab v2.2.0
The goal of this page is to summarize the new scientific features of Scilab and its environment during the year 2011.
During the year 2011, the following versions of Scilab were released :
 3/03/2011: Scilab v5.3.1
In brief, the following is a list of the new or updated scientific features in 2011 :
 6th of January 2011: New Module: scibench v0.4
 21st of January 2011: New Module: NaNToolbox v1.2
 6th of February 2011: New Module: Regression tools v0.1
 16th of February 2011: New Script : AG_fluid_dynamics
 3rd of March 2011: New Module: Wavelab v1.0
 8th of March 2011: New Module: Particle Swarm Optimization Toolbox v0.2
 15th of March 2011: New Module: FreeASM
 23rd of March 2011: New Script: Crystal Structure Animation v2.0
 25th of March 2011: Low Discrepancy Sequences v0.2 (Update)
 27th of April 2011: Matrix Market v1.4 (Update)
 6th of June 2011: New Module: Linear Algebra v0.1
 8th of June 2011: New Module: Mathieu functions v2.0
 20th of July 2011: New Module: NIST Datasets v0.2
27th of July 2011: CelestLab v2.2.0 (Update)
New Computational Features in Scilab 5.3.1
These informations are extracted from the CHANGES.
 Improvement of the Karmarkar linear optimization solver.
 Help pages for the bitxor, bitcmp, bitget and bitset functions have been created.
 The factorial function is now documented.
The following is a more detailed list of changes for the Karmakar function:
 User can configure an output function.
 The number of iterations can be put as an outputargument.
 x0 can be put as an optional argument.
 Management of inequality constraints.
 Management of bounds.
 Computation of the exitflag.
 Computation of the Lagrange multipliers.
 Documentation provided for the rtolf and gam parameters.
 Documentation provided for the stopping rule.
 More examples provided.
The following is an example of the karmarkar function, extracted from the help. We solve a linear program with linear inequalities.
c = [20 24]'; A = [ 3 6 4 2 ]; b = [60 32]'; xopt=karmarkar([],[],c,[],[],[],[],[],A,b)
The previous script produces the following output.
>xopt=karmarkar([],[],c,[],[],[],[],[],A,b) xopt = 3.9999125 7.9999912
6th of January 2011: scibench
The goal of this project is to provide a collection of benchmark scripts to measure the performance of Scilab.
This module provides the following functions.
 scibench_backslash : Benchmarks the backslash operator.
 scibench_benchfun : Benchmarks a function and measure its performance.
 scibench_dynbenchfun : Benchmarks a function with increasing data size.
 scibench_getsettings : Inquire the parameters of Scilab and its environment.
 scibench_latticeboltz : Performs a 2D Lattice Boltzmann simulation with Scilab.
 scibench_matmul : Benchmarks the matrixmatrix multiplication.
The scibench project is available on ATOMS:
http://atoms.scilab.org/toolboxes/scibench
and is developped on the Forge :
http://forge.scilab.org/index.php/p/scibench/
The following is an example of the scibench_matmul function.
lines(0); stacksize("max"); scf(); scibench_matmul ( );
The previous script produces the following output.
>scibench_matmul ( ); Run #1: n= 1, T=0.010 (s), Mflops= 0 Run #2: n= 18, T=0.002 (s), Mflops= 5 Run #3: n= 40, T=0.010 (s), Mflops= 12 Run #4: n= 48, T=0.012 (s), Mflops= 18 Run #5: n= 58, T=0.002 (s), Mflops= 195 Run #6: n= 70, T=0.014 (s), Mflops= 49 Run #7: n= 84, T=0.004 (s), Mflops= 296 Run #8: n= 101, T=0.007 (s), Mflops= 294 Run #9: n= 122, T=0.003 (s), Mflops= 1210 Run #10: n= 147, T=0.004 (s), Mflops= 1588 Run #11: n= 177, T=0.005 (s), Mflops= 2218 Run #12: n= 213, T=0.014 (s), Mflops= 1380 Run #13: n= 256, T=0.013 (s), Mflops= 2581 Run #14: n= 308, T=0.013 (s), Mflops= 4495 Run #15: n= 370, T=0.015 (s), Mflops= 6753 Run #16: n= 444, T=0.031 (s), Mflops= 5646 Run #17: n= 533, T=0.012 (s), Mflops= 25236 Run #18: n= 640, T=0.052 (s), Mflops= 10082 Run #19: n= 768, T=0.079 (s), Mflops= 11467 Run #20: n= 922, T=0.116 (s), Mflops= 13513 Run #21: n= 1107, T=0.194 (s), Mflops= 13985 Run #22: n= 1329, T=0.310 (s), Mflops= 15144 Run #23: n= 1595, T=0.463 (s), Mflops= 17527 Run #24: n= 1914, T=0.722 (s), Mflops= 19423 Run #25: n= 2297, T=1.408 (s), Mflops= 17215 Best performance: N=533, T=0.012 (s), MFLOPS=25236
The previous script produces the following figure.
21st of January 2011: NaNToolbox v1.2
This toolbox is for classification and statistics. This toolbox is especially written for data with missing values encoded as NaN. It is a Scilab port of the nantoolbox for matlab/octave.
This toolbox is developped by Holger Nahrstaedt under GPL (2.1).
The classification routines are routines for train a classificator (nan_train_sc, nan_classify, svmtrain, train ) and routines for testing (nan_test_sc, predict, svmpredict) and visualisation (nan_confusionmat, nan_partest, nan_rocplot).
The Nan toolbox provides the following functions.
 Data Correlation and Covariance
 nan_conv — Convolve two vectors.
 nan_conv2 — performs 2D convolution of matrices a and b
 nan_conv2nan — calculates 2dim convolution between X and Y
 nan_cor — calculates the correlation matrix
 nan_corrcoef — calculates the correlation matrix from pairwise correlations.
 nan_corrcov — Compute correlation matrix from covariance matrix.
 nan_cov — calculates covariance matrix
 nan_covm — generates covariance matrix
 nan_decovm — decomposes extended covariance matrix
 nan_ecovm — produces an extended Covariance matrix,
 nan_partcorrcoef — calculates the partial correlation between X and Y after removing the influence of Z.
 nan_rankcorr — calculated the rank correlation coefficient.
 nan_tiedrank — compute rank of samples, the mean value is used in case of ties
 nan_xcorr — Compute correlation R_xy of X and Y for various lags k:
 nan_xcorr2 — Compute the 2D correlation
 nan_xcov — Compute covariance at various lags[=correlation(xmean(x),ymean(y))].
 nan_xcovf — generates crosscovariance function.
 Classification
 nan_cat2bin — converts categorial into binary data
 nan_classify — classifies sample data into categories
 nan_confusionmat — Confusion matrix for classification algorithms.
 nan_fss — feature subset selection and feature ranking
 nan_kappa — estimates Cohen's kappa coefficient
 nan_mahal — return the Mahalanobis' Dsquare distance
 nan_partest — This function calculate the performance, based on Bayes theorem, of a
 nan_rocplot — plot a Receiver Operating Characteristic (ROC) curve
 nan_row_col_deletion — selects the rows and columns for removing any missing values.
 nan_svmrocplot — plotroc draws the recevier operating characteristic(ROC) curve for an svmmodel
 nan_test_sc — apply statistical and SVM classifier to test data
 nan_train_lda_sparse — Linear Discriminant Analysis for the Small Sample Size Problem as described in
 nan_train_sc — Train a (statistical) classifier
 nan_xval — is used for crossvalidation
 predict — Does prediction for a calculated svm model
 svmpredict — Does prediction for a calculated svm model
 svmtrain — trains a svm model
 train — trains a linear model
 Cluster Analysis
 nan_kmeans — Kmeans clustering algorithm.
 Descriptive Statistics
 nan_center — removes the mean
 nan_coef_of_variation — returns STD(X)/MEAN(X)
 nan_detrend — removes the trend from data, NaN's are considered as missing values
 nan_ecdf — empirical cumulative function
 nan_geomean — calculates the geomentric mean of data elements.
 nan_grpstats — Summary statistics by group.
 nan_harmmean — calculates the harmonic mean of data elements.
 nan_hist2res — Evaluates Histogram data
 nan_histc — Produce histogram counts.
 nan_histo — calculates histogram for each column
 nan_histo2 — calculates histogram of each column
 nan_histo3 — calculates histogram and performs data compression
 nan_histo4 — calculates histogram for rows and supports data compression
 nan_iqr — calculates the interquartile range
 nan_kurtosis — estimates the kurtosis
 nan_mad — estimates the Mean Absolute deviation
 nan_mean — calculates the mean of data elements.
 nan_meanAbsDev — estimates the Mean Absolute deviation
 nan_meandev — estimates the Mean deviation
 nan_meansq — calculates the mean of the squares
 nan_medAbsDev — calculates the median absolute deviation
 nan_median — median data elements,
 nan_moment — estimates the pth moment
 nan_percentile — calculates the percentiles of histograms and sample arrays.
 nan_prctile — calculates the percentiles of histograms and sample arrays.
 nan_quantile — calculates the quantiles of histograms and sample arrays.
 nan_range — Range of values
 nan_ranks — gives the rank of each element in a vector.
 nan_rms — calculates the root mean square
 nan_sem — calculates the standard error of the mean
 nan_skewness — estimates the skewness
 nan_spearman — Spearman's rank correlation coefficient.
 nan_statistic — estimates various statistics at once.
 nan_std — calculates the standard deviation.
 nan_sumsq — calculates the sum of squares.
 nan_trimean — evaluates basic statistics of a data series
 nan_trimmean — calculates the trimmed mean by removing the upper and lower
 nan_var — calculates the variance.
 nan_y2res — evaluates basic statistics of a data series
 nan_zScoreMedian — removes the median and standardizes by the 1.483*median absolute deviation
 nan_zscore — removes the mean and normalizes the data to a variance of 1.
 File I/O
 readsparse — reads files in LIBSVM format
 writesparse — writes sparse matrix to a file in LIBSVM format
 xptopen — Read and write in stata fileformat
 Hypothesis Tests
 nan_ttest — (paired) ttest
 nan_ttest2 — (unpaired) ttest
 Utility functions
 flag_accuracy_level — sets and gets accuracy level
 flag_impl_significance — sets and gets default alpha (level) of any significance test
flag_impl_skip_nan — sets and gets default mode for handling NaNs
 flag_nans_occured — checks whether the last call(s) to sumskipnan or covm
 nan_accumarray — Create an array by accumulating the elements of a vector into the positions defined by their subscripts.
 nan_fft — matlab compatible fft
 nan_flix — floating point index  interpolates data in case of noninteger indices
 nan_grp2idx — Create index vector from a grouping variable.
 nan_ifft — matlab compatible ifft
 nan_ismember — Checks which elements of one matrix are member of an other matrix
 nan_mgrp2idx — Convert multiple grouping variables to index vector
 nan_postpad — append the scalar
 nan_prepad — prepend the scalar
 nan_unique — Return the unique elements of x, sorted in ascending order.
 str2array — CMEX implementation of STR2ARRAY  this function is part of the NaNtoolbox.
 sumskipnan — adds all nonNaN values.
 Statistical Visualization
 nan_andrewsplot — Andrews plot for multivariate data.
 nan_boxplot — Draw a boxandwhiskers plot for data provided as column vectors.
 nan_cdfplot — plots empirical commulative distribution function
 nan_ecdfhist — Create histogram from ecdf output.
 nan_errorb — plot nice healthy error bars
 nan_errorbar — This function put an errobar range onto plot
 nan_fscatter3 — Plots point cloud data
 nan_gplotmatrix — Scatter plot matrix with grouping variable.
 nan_gscatter — scatter plot of groups
 nan_hist — Histogram.
 nan_nhist — Histogram
 nan_normplot — Produce a normal probability plot for each column of X.
 nan_parallelcoords — Parallel coordinates plot for multivariate data.
 nan_plotmatrix — function [h]= * nan_plotmatrix(x,y,param1,param2)
The Nan Toolbox is available on ATOMS:
http://atoms.scilab.org/toolboxes/nan
To install it, type:
atomsInstall('nan')
6th of February 2011: Regression tools
The toolbox regtools provides three functions for performing linear and non linear regression analysis.
The regtools module provides the following functions:
 linregr() provides an interactive user interface for linear regression analysis, including plot facilities and the most relevant statistical information at the solution.
 nlinregr() provides an interactive user interface for performing non linear (weighted) regression analysis. Also here plot facilities and statistical information are available. Both functions can be called in silent command line mode.
 nlinlsq() is a more flexible non linear (weighted) regression analysis function  called by nlinregr(). nlinlsq() uses the scilab function optim() for solving the regression problem. Supports both analytical and numerical derivatives.
 qqplot()  providing quantilequantile plots.
This module is developped by Torbjorn Pettersen.
It is available on ATOMS:
http://atoms.scilab.org/toolboxes/regtools
To install it, type:
atomsInstall('regtools')
The following is the example provided with the nlinlsq function.
deff('yhat=nlinmod(p,x)',['yhat=p(1)+p(2)*exp(p(3)*x);']); // define regression model to be fitted deff('dydp=dnlinmod(p,x)',['dydp=[ones(x),exp(p(3)*x),p(2)*x.*exp(p(3)*x)];']); // define d(yhat)/dp x=[1:100]'/10; phat=[2;10;0.5]; // generate some data points y=nlinmod(phat,x)+grand(100,1,'nor',0,1)/2; // with with random noice added. p0=ones(3,1); // initial estimate for the regression parameters. // Solve nonlinear regression problem with output every 4'th iteration and nameing of model parmameters. [p,stat]=nlinlsq(list(nlinmod),list(dnlinmod),x,y,[],p0,[],[],list(4,'A B C')); // Solve weighted nonlinear regression problem with default names for the regression parameters // and numerical derivatives. [pwt,stat]=nlinlsq(list(nlinmod),'',x,y,(1)./y,p0,[],[],10); // Show the difference between the two solutions... scf(); plot(x,y,'o'); xtitle('Demo of nlinlsq()','x','y=A+B*exp(C*x)') plot(x,nlinmod(p,x),'b'); plot(x,nlinmod(pwt,x),'r'); xgrid(); legend('Data','unweighted','weighted',2); // Solve weighted nonlinear regression problem without analytical derivaties. [pwt,stat]=nlinlsq(list(nlinmod),[],x,y,(1)./y,p0,[],[],10); clc; // Display the regression report from the previous solution. nlinlsq(stat)
The previous script produces the following output.
============================================================= REPORT SUMMARY  Parameters: Estimate Std. Error tvalue Pr(>t) Sign p(1) 1.20e+000 6.72e002 17.81 2.41e032 *** p(2) 1.03e+001 1.18e001 87.26 5.53e094 *** p(3) 4.12e001 1.15e002 35.73 1.26e057 ***  Signif. codes: 0 `***´ 0.001 `**´ 0.01 `*´ 0.05 `.´ 0.1 ` ´ 1 Residual standard error: 2.78e001 on 97 degrees of freedom Residual sum of squares: 7.47e+000  Asymptotic confidence interval: 2.5% 97.5% p(1) 1.06e+000 1.33e+000 p(2) 1.01e+001 1.06e+001 p(3) 3.89e001 4.34e001  Correlation matrix: p(1) p(2) p(2) 0.095 p(3) 0.823 0.331 ============================================================= ans = 1.1967475 10.331302 0.4116172
The previous script produces the following plots.
16th of February 2011: AG_fluid_dynamics
This script implements multispecies RK3 algorithm described in paper "Computational fluctuating fluid dynamics", J.B. Bell, A. Garcia, and S. Williams, to appear in ESAIM: Mathematical Modelling and Numerical Analysis.
This script is available on the File Exchange:
http://fileexchange.scilab.org/toolboxes/122000
Original MATLAB program written by Anton de la Fuente and ported into Scilab by David Adams, from Equalis.
>exec('AG_fliud_dynamics.sce', 1) Finished 5 of 100 samples; about 47.424 seconds to completion Finished 10 of 100 samples; about 39.735 seconds to completion Finished 15 of 100 samples; about 35.9777 seconds to completion Finished 20 of 100 samples; about 32.948 seconds to completion Finished 25 of 100 samples; about 30.468 seconds to completion Finished 30 of 100 samples; about 28.6113 seconds to completion Finished 35 of 100 samples; about 26.741 seconds to completion Finished 40 of 100 samples; about 24.711 seconds to completion Finished 45 of 100 samples; about 22.4608 seconds to completion Finished 50 of 100 samples; about 20.327 seconds to completion Finished 55 of 100 samples; about 18.2135 seconds to completion Finished 60 of 100 samples; about 16.276 seconds to completion Finished 65 of 100 samples; about 14.2046 seconds to completion Finished 70 of 100 samples; about 12.1881 seconds to completion Finished 75 of 100 samples; about 10.1243 seconds to completion Finished 80 of 100 samples; about 8.077 seconds to completion Finished 85 of 100 samples; about 6.03724 seconds to completion Finished 90 of 100 samples; about 4.02133 seconds to completion Finished 95 of 100 samples; about 2.01568 seconds to completion Finished 100 of 100 samples; about 0 seconds to completion Total time elapsed: 40.389 seconds Conserved variables: (Initial) / (Final) Density : 0.00178 / 0.00178 Momentum : 0 / 2.47025e018 Energy : 1.01185e+006 / 1.01185e+006 Variances and Covariances (Measured) : (Theory) (Percent Error) rho = 6.06307e010 : 1.19915e008 94.94 % Jx = 2.9168 : 3.40832 14.42 % Energy = 3.27026e+009 : 4.84371e+009 32.48 % rho1 = 2.28284e009 : 2.99787e009 23.85 % RhoE = 0.311457 : 5.11248 93.91 %
3rd of March 2011: Wavelab v1.0
WaveLab is a library for wavelet analysis, wavelet packet analysis, cosinepacket. This toolbox is developped by Holger Nahrstaedt and David Donoho.
This toolbox is a Scilab port of the Matlab Wavelab toolbox developped at stanford:
http://wwwstat.stanford.edu/~wavelab/Wavelab_850/index_wavelab850.html
The Matlab Wavelab toolbox is currently developped by
 David Donoho,
 Arian Maleki and
 Morteza Shahram,
with major contribution from
 Jon Buckheit
 Maureen Clerc
 Jerome Kalifa
 Stephane Mallat
 Thomas Yu
Previous Wavelab team members include:
 Mark Reynold Duncan
 Xiaoming Huo
 Ofer Levi
 Jonathan Buckheit
 Shaobing Chen
 Iain Johnstone
 Jeffrey Scargle
 Rainer von Sachs
 Thomas Yu
The toolbox has the following main features:
 orthogonal and biorthogonal wavelet transforms,
 translationinvariant wavelets,
 interpolating wavelet transforms,
 cosine packets,
 wavelet packets,
 matching pursuit.
This toolbox provides more than 300 functions:
 Pursuit — The routines in this directory perform matching pursuit decomposition and reconstruction for 1d signals. The main tools for allpurpose use are WPPursuit and CPPursuit
 BiOrthogonal Wavelet Transform tools
DownDyadHi_PBS — HiPass Downsampling operator (periodized,symmetric)
DownDyadLo_PBS — LoPass Downsampling operator (periodized,symmetric)
DownDyad_SBS — Symmetric Downsampling operator
 FWT2_PB — 2dimensional wavelet transform (periodized, biorthonormal)
 FWT2_PBS — 2dimensional wavelet transform (periodized, biorthonormal)
 FWT2_SBS — 2dimensional wavelet transform (symmetric extension, biorthogonal)
 FWT_PB — Forward Wavelet Transform (periodized, biorthogonal)
 FWT_PBS — Forward Wavelet Transform (periodized, biorthogonal, symmetric)
 FWT_SBS — Forward Wavelet Transform (symmetric extension, biorthogonal, symmetric)
 IWT2_PB — Inverse 2d Wavelet Transform (periodized, biorthogonal)
 IWT2_PBS — Inverse 2d Wavelet Transform (periodized, biorthogonal)
 IWT2_SBS — Inverse 2d Wavelet Transform
 IWT_PB — Inverse Wavelet Transform (periodized, biorthogonal)
 IWT_PBS — Inverse Wavelet Transform (periodized, biorthogonal,symmetric)
 IWT_SBS — Inverse Wavelet Transform (symmetric extension, biorthogonal, symmetric)
 MakeBSFilter — Generate Biorthonormal QMF Filter Pairs
MirrorSymmFilt — apply (1)^t modulation to symmetric filter
 PlotPBSMultiRes — MultiResolution Display of 1d Wavelet Transform
UpDyadHi_PBS — HiPass Upsampling operator; periodized
UpDyadLo_PBS — LoPass Upsampling operator; periodized
UpDyad_SBS — Symmetric Upsampling operator
 dyadpartition — determine dyadic partition in wavelet transform of nondyadic signals
 extend — performs various kinds of symmetric extension
 symm_aconv — Symmetric Convolution Tool for TwoScale Transform
 symm_iconv — Symmetric Convolution Tool for TwoScale Transform
 Continuous Wavelet Transform tools
 AWT — Analytical Wavelet Transform
BuildSkelMap — Chain together Ridges of Wavelet Transform
BuildSkelMapFast — Chain together Ridges of Wavelet Transform
 CWT — Continuous Wavelet Transform
 CWTscale — Complement to Continuous Wavelet Transform
 CalcCWTNorms — Calculate Norm at each Scale of CWT
 CalcCWTPars — Calculate Underlying Parameters of CWT Structure
CalcCWTScale — Calculate Scales and TickMarks for CWT Display
CalcFracSpectrum — Calculate Spectrum of Local Scaling Exponents
CalcGenFracDimen — Calculate Generalized Fractal dimensions
CalcMomentGenFun — Calculate Moment Generating Function
CalcThermoPartition — Build Thermodynamic Partition Function
ExtractRidge — Pull One Ridge Continuous Wavelet Transform
 IRWT — Inverse Real Wavelet Transform
 ImageCWT — Image of Continuous Wavelet Transform
 ImageRWT — Image of Continuous Wavelet Transform
 ImageWTMM — Maxima of Continuous Wavelet Transform
 MM_RWT — Modulus Maxima of a Real Wavelet Transform
PlotGenFracDimen — Plot Generalized Fractal Dimension Function
PlotMomentGenFun — Display Moment Generating Function
PlotRidges — LogLog Plot of Ridges in Continuous Wavelet Transform
PlotSkelMap — Display Skeleton of Continuous Wavelet Transform
PlotThermoPartition — Plot Thermodynamic Partition Function
PruneSkelMap — Remove Thin Bones in Skeleton of Continuous Wavelet Transform
 RWT — Real Wavelet Transform
 Ridge_AWT — Ridges of an Analytic Wavelet Transform
SkelMap — Chain together Ridges of Wavelet Transform
 WTMM — Wavelet Transform Maximum Modulus
 Datasets, Documentation and Readers
 MAT2RAW — MAT2RAW(filename,x) writes matrix 'x' into file 'filename' in
MakeBrownian — Create Fractional Brownian Signal
MakeCantor — recursively generates a Cantor distribution.
MakeFractal — Create Random or Deterministic SelfSimilar signal
MakeImage — Make artificial 2d signal
MakeProcess — Generates NR locally stationary process realizations
MakeSignal — Make artificial signal
 RAW2MAT — mat = RAW2MAT(filename,lines,columns) loads a '.raw' file into
ReadImage — Read Image file in 8bit raw binary format
ReadSignal — Read 1d signal from file in ascii format
 makediag — Make a diagonal pattern
Tools for DeNoising Signals with White Gaussian Noise
 CPDeNoise — DeNoising in an adaptively chosen CP basis
CohWave — Denoising of 1d signal with wavelet thresholding.
 GWN — Generation of Gaussian White Noise
 GWN2 — Generation of 2D Gaussian White NNoise
 GWNoisy — Addition of a Gaussian White Noise
 GWNoisy2 — Addition of a 2D Gaussian White Noise
 HT — Hard Threshold Applied to Wavelet Coefficients.
 HT2 — Hard Threshold Applied to Image Wavelet Coefficients.
HardThresh — Apply Hard Threshold
HybridThresh — Adaptive Threshold Selection Using Principle of SURE
IdealWavDenoise — Simulation of an Ideal Thresholding Applied to Wavelet Coefficients.
InvShrink — Shrinkage with Exponential Factor applied
MinMaxThresh — Minimax Thresholding
MultiHybrid — Apply Shrinkage to Wavelet Coefficients
 MultiMAD — Apply Shrinkage with leveldependent Noise level estimation
 MultiSURE — Apply Shrinkage to Wavelet Coefficients
MultiVisu — Apply sqrt(2log(n)) Thresholding to Wavelet Coefficients
NormNoise — Estimates noise level, Normalize signal to noise level 1
 ST — Soft Threshold Applied to Wavelet Coefficients.
 ST2 — Soft Threshold Applied to Wavelet Coefficients.
 SUREThresh — Adaptive Threshold Selection Using Principle of SURE
SoftThresh — Apply Soft Threshold
 TIDenoiseHard2 — TranslationInvariant Hard Wavelet Thresholding of Images.
 TIDenoiseSoft2 — TranslationInvariant Soft Wavelet Thresholding of Images.
 ThreshCP — Cosine packet decomposition of a noisy signal,Best Basis analysis, Thresholding in Best Basis
 ThreshWP — Wavepacket decomposition of a noisy signal, Best Basis analysis, Thresholding in Best Basis
ThreshWave — Denoising of 1d signal with wavelet thresholding.
ThreshWave2 — Denoising of 2d image with wavelet thresholding.
 ValSUREThresh — Adaptive Threshold Selection Using Principle of SURE
VisuThresh — Visually calibrated Adaptive Smoothing
 WPDeNoise — DeNoising in an adaptively chosen WP basis
WaveShrink — Soft Threshold Shrinkage Applied to Wavelet Coefficients
 Wiener — Wiener filter.
 Wiener2 — Wiener filter for images.
 Tools for Fast Matrix Multiplication in Wavelet Basis
 FNWT_PO — Nonstandard Wavelet Transform (Periodized, Orthogonal)
 FSFT_PO — Convert Matrix to Standard Form (Periodized,Orthogonal)
 INWT_PO — Inverse Nonstandard Wavelet Transform (Periodized, Orthogonal)
 ISFT_PO — Convert Standard Form to Matrix Form (Periodized,Orthogonal)
 Mat2SparseNSForm — Put Matrix into Sparse Nonstandard Form
 Mat2SparseSForm — Put Matrix into Sparse Standard Form
NonStdWaveMult — Nonstandard Wavelet Matrix Multiplication
StdWaveMult — Standard Wavelet Matrix Multiplication
StretchMatrix — Stretch matrix into BCR nonstandard form
 ndyad — Index dyad of nonstandard wavelet transform
 Fractal Analysis
FracPartition — Fractal Partition Function based on wavelet modulus maxima
FracScalExp — Calculate Moment Generating Function
FracSingSpect — Calculate Spectrum of Local Scaling Exponents
 Interpolating Refinements and Wavelet Transforms
AIDyadDown — AverageInterpolating DownSampling Operator
AIDyadUp — AverageInterpolating UpSampling Operator
 AIRefine — AverageInterpolating Refinement Scheme
 AIRefine2d — 2d Refinement based on AverageInterpolation
DDDyadDown — DeslauriersDubuc Interpolating DownSampling Operator
DDDyadUp — Interpolating UpSampling Operator
 DDRefine — DeslauriersDubuc Refinement Scheme
 FWT_AI — AverageInterpolating wavelet transform
 FWT_DD — Interpolating Wavelet Transform
 HCoarsen2d — 2d Coarsening operator based on Haar Pyramid
 HRefine2d — 2d Refinement based on Haar Pyramid
 IWT_AI — Inverse transform, averageinterpolating wavelets
 IWT_DD — Inverse transform DeslauriersDubuc wavelets
 MakeAIBdryFilter — Edge filters for AverageInterpolating Wavelets
 MakeAIFilter — Filters for AverageInterpolating Wavelets
 MakeDDBdryFilter — Edge filters, Interpolating (DeslauriersDubuc) Refinement
 MakeDDFilter — Filter for interpolating (DeslauriersDubuc) Refinement
 PlotAIMultiRes — AverageInterpolating MRA
 PlotDDMultiRes — Interpolating MRA
 Invariant Wavelet Transform tools
BestShift — Best Circulant Shift of Signal
 FWT2_TI — 2D translation invariant forward wavelet transform
 FWT_ATrou — Fast Dyadic Wavelet Transform (periodized, orthogonal)
 FWT_Stat — stationary wavelet transform
 FWT_TI — translation invariant forward wavelet transform
 IMM_DWT — Inverse Reconstruction of signals from Modulus Maxima of a Dyadic Wavelet Transform
 IWT2_TI — Invert 2d translation invariant wavelet transform
 IWT_ATrou — Inverse Dyadic Wavelet Transform
 IWT_Stat — Invert Stationary Wavelet Transform
 IWT_TI — Invert translation invariant wavelet transform
 MM_DWT —
 MakeATrouFilter — Generate Biorthonormal Quadratic Spline Filter Pair
MakeDyadFilter — Generate Biorthonormal Quadratic Spline Filter Pair
ModulusMaxima — Written by Maureen Clerc and Jerome Kalifa, 1997
PlotStatTable — Plot Stationary Wavelet Transform
 Median Interpolating Pyramid Transform Tools
 FMIPT — Forward Median Interpolationg Pyramid Transform
 IMIPT — Inverse Median Transform
 MedITriadDown — Med Triad Down
 MedITriadUp — Med Triad Up
 PlotMRA_MT — MultiResolution Display of 1d Median Transform
 PlotMTCoeff — Spikeplot display of Median Transform coefficients
QuadMedRef — Quadratic Interpolation given median information
 quadmedian — quadmedian  find the median value of a quadratic polynomial on an interval
 Periodic Meyer Wavelet Transform Tools
CoarseMeyerCoeff — Resume coefficients, coarse level
CoarseMeyerProj — Invert Meyer Transform, coarse level C
CombineCoeff — Combine local trig. coeff's into wavelet coeff's
DetailMeyerCoeff — Detail coefficients, level j
DetailMeyerProj — Invert Meyer Transform, level j
ExtendProj — Extend a projection to all of the integers n/2+1 > n/2
 FTWT2_YM — 2dimensional Tensor Product Meyer Wavelet Transform
 FWT2_YM — 2d Forward Wavelet Transform (periodized Meyer Wavelet)
 FWT_YM — Forward Wavelet Transform (periodized Meyer Wavelet)
FineMeyerCoeff — Meyer Coefficients, finest level
FineMeyerProj — Invert Meyer Transform, finest level J1
FoldMeyer — Fold a vector onto itself using a specified window
 ITWT2_YM — Inverse 2d Tensor Meyer Wavelet Transform
 IWT2_YM — 2d Inverse Wavelet Transform (periodized Meyer Wavelet)
 IWT_YM — Inverse Wavelet Transform (periodized Meyer Wavelet)
 PlotYMMultiRes — Plot MRA for Meyer Wavelet
 QuasiDCT — Nearly Discrete Cosine Transform of Type I.
 QuasiDST — Nearly Discrete Sine Transform of Type I.
SeparateCoeff — Separate wavelet coeff. into local trig. coeff.
UnfoldMeyer — Unfold a vector using a specified window.
WindowMeyer — auxiliary window function for Meyer wavelets.
 dct_ii — Discrete Cosine Transform of Type II
 dct_iii — Discrete Cosine Transform of Type III
 dst_ii — Discrete Sine Transform of Type II
 dst_iii — Discrete Sine Transform of Type III
 Orthogonal Wavelet Transform Tools
 CDJVDyadDown — Downsampling with Boundary Correction
CDJVDyadUp — UpSampling with CDJV Boundary Correction
ContourMultiRes — MultiResolution Mesh Display of 1d Wavelet Transform
DisplayWaveCoeff — Display wavelet coefficients
DownDyadHi — HiPass Downsampling operator (periodized)
DownDyadLo — LoPass Downsampling operator (periodized)
 FTWT2_PO — 2d tensor wavelet transform (periodized, orthogonal)
 FWT2_PO — 2d MRA wavelet transform (periodized, orthogonal)
 FWT_CDJV — Forward Wavelet Transform (boundarycorrected)
 FWT_IO — Forward Wavelet Transform (boundarycorrected)
 FWT_PO — Forward Wavelet Transform (periodized, orthogonal)
 ITWT2_PO — Inverse 2d tensor wavelet transform (periodized, orthogonal)
 IWT2_PO — Inverse 2d MRA wavelet transform (periodized, orthogonal)
 IWT_CDJV — Inverse Wavelet Transform (boundary corrected)
 IWT_IO — Inverse Wavelet Transform (boundary corrected)
 IWT_PO — Inverse Wavelet Transform (periodized, orthogonal)
Make2dWavelet — Make 2d Wavelet
 MakeCDJVFilter — Set up filters for CDJV Wavelet Transform
 MakeOBFilter — Makes Orthogonal Boundary conjugate mirror filters
 MakeONFilter — Generate Orthonormal QMF Filter for Wavelet Transform
MakeWavelet — Make periodized orthogonal wavelet
MirrorFilt — Apply (1)^t modulation
PlotMultiRes — MultiResolution Display of 1d Wavelet Transform
PlotSpikes — Plot 1d signal as baseline with series of spikes
PlotWaveCoeff — Spikeplot display of wavelet coefficients
UpDyadHi — HiPass Upsampling operator; periodized
UpDyadLo — LoPass Upsampling operator; periodized
 UpSampleN — Upsampling operator
 aconv — Convolution Tool for TwoScale Transform
 dyad — Index entire jth dyad of 1d wavelet xform
 dyad2ix — Convert wavelet indexing into linear indexing
 dyadlength — Find length and dyadic length of array
 iconv — Convolution Tool for TwoScale Transform
 lshift — Circular left shift of 1d signal
 quad2ix — Translate 2d wavelet indexing into linear indexing
 quadlength — Find length and dyadic length of square matrix
 reverse — Reverse order of elements in 1d signal
 rshift — Circular right shift of 1d signal
 Oned Wavelet and Cosine Packet Tools
BestBasis — CoifmanWickerhauser BestBasis Algorithm
 CPAnalysis — Dyadic table of all Cosine Packet Coefficients
 CPSynthesis — Synthesize signal from cosine packet table
 CPTour — Cosine packet decomposition and Best Basis analysis
CalcStatTree — Build tree with entropy numbers
CalcTreeHeight — Measure the total height of a stattree
 CalcWPLocation — Calculate location of wavelet packet entry
CompareStdBases — Calculate entropy of some standard bases
DrawHeisenberg — Draw Heisenberg rectangle
 FPT_CP — Fast transform into specific cosine packet basis
 FPT_WP — Analyze image into specific wavelet packet basis
 IPT_CP — Synthesize signal from cosine packet coefficients
 IPT_WP — Synthesize signal from wavelet packet coefficients
ImageGaborPhase — TimeFrequency Display with congruent rectangles
ImagePhasePlane — Partition phase space by rectangular blocks
ImagePhaseVarious — Compare four phase plane displays
MakeBasis — Create a basis tree for a standard basis
MakeCosinePacket — Make Cosine Packet signal
 MakeONBell — Make Bell for Orthonormal Local Cosine Analysis
MakeWaveletPacket — Make periodized orthogonal wavelet packet
PackBasisCoeff — Stuff basis coefficients into packet table
PlotBasisTree — Display basis tree with decorated branch lengths
PlotCoeffComparison — Compare coefficients in various bases
PlotCompressNumbers — Plot Compression Numbers
PlotGaborPhase — Partition phase space with congruent rectangles
PlotPacketTable — Display entries in wavelet, cosine packet tables
PlotPhasePlane — Plot TimeFrequency content of signal
PlotPhaseVarious — PlotPhaseVarious  Show several different phase plane images
PlotWavePhase — Partition phase space by wavelet tiling
UnpackBasisCoeff — Extract basis coefficients from packet table
UnpackStatValue — Unpack the value for given basis from the stat tree
 WPAnalysis — Dyadic table of all Wavelet Packet coefficients
 WPSynthesis — Synthesize signal from wavelet packet coefficients
 WPTour — Wavelet packet decomposition and Best Basis analysis
 dct_iv — Type (IV) Discrete Cosine Xform
 edgefold — Perform folding projection with (+,) polarity at EDGES
 edgeunfold — Undo folding projection with (+,) polarity at EDGES
 fold — Folding projection with (+,) polarity
 node — Tree indexing function
 packet — Packet table indexing
 unfold — Undo folding projection with (+,) polarity
 2d Wavelet and Cosine Packet Tools
Best2dBasis — CoifmanWickerhauser Best2dBasis Algorithm
 BuildFBITree — Build the 2d Basis Tree for fingerprint compression
 CP2Tour — Cosine Packet Analysis in Adaptively Chosen Basis
 CP2dTour — Cosine Packet Analysis in Adaptively Chosen Basis
Calc2dPktTable — Put Wavelet/Cosine Packet Coefficients into 2d Table
 Calc2dSQTree — Put Packet Table Statistics into Quad Tree
Calc2dStatTree — Put Wavelet/Cosine Packet Statistics into Quad Tree
Calc2dTreeHeight — Measure the total height of a statquadtree
CalcEntropy — Calculate entropy number of array
DownQuad — Split 2d image into 4 subbands
 FPT2_CP — Analyze image into 2d cosine packet coefficients
 FPT2_WP — Analyze image into 2d wavelet packet coefficients
 IPT2_CP — Synthesize image from 2d cosine packet coefficients
 IPT2_WP — Synthesize image from 2d wavelet packet coefficients
Make2dCosinePacket — Create 2d Cosine packet
Make2dWaveletPacket — Create 2d Wavelet Packet
Plot2dBasisTree — Show quad tree of best basis
Plot2dPartition — Show partition of Time/Freq plane by best basis
UpQuad — Merge four subbands into 2d image
 WP2Tour — 2d Wavelet Packet Analysis in Adaptively Chosen Basis
 WP2dTour — 2d Wavelet Packet Analysis in Adaptively Chosen Basis
 dct2_iv — 2dimensional discrete cosine transform (type IV)
 qnode — Quad tree indexing
 qpkt2ix — Translate quadpacket index to linear index
 quadbounds — x,y bounds of quadlet
 Matching Pursuit with Wavelet and Cosine Packet Dictionaries
 CPAtomicSynthesis — Generate signal from list of CPcomponents
 CPImpulse — CPAnalysis of an individual Cosine Packet
 CPMPursuitTour — Cosine Packet atomic decomposition
 CPPursuit — Matching Pursuit with Cosine Packet Dictionary
 CPPursuitBF — Matching Pursuit using Cosine Packet Dictionary with backfitting
 CPPursuitTour — Cosine Packet atomic decomposition
 FCPSynthesis — Synthesize signal from full cosine packet table
 FWPAtomicSynthesis — Fast Wavelet Packet Synthesis from Atom List
 FWPSynthesis — Synthesize signal from full wavelet packet table
ImageAtomicPhase — Image timefrequency content of atom list
MakeSynthesisTable — Convert atom list to packet table
MonitorPursuit — Display intermediate Pursuit progress
PlotAtomicPhase — Plot timefrequency content of atom list
PlotSynthesisTable — Display entries in atomlist as WP or CP table
 WPAtomicSynthesis — Wavelet Packet Synthesis from Atom List
 WPImpulse — WPAnalysis of an individual Wavelet Packet
 WPMPursuitTour — Wavelet Packet atomic decomposition
 WPPursuit — Atomic Decomposition into Wavelet Packets by Matching Pursuit
 WPPursuitBF — Matching Pursuit using Wavelet Packet Dictionary with backfitting
 WPPursuitTour — Wavelet Packet atomic decomposition
 ix2pkt — Convert linear index to packet table index
 pkt2ix — Convert packet table index to linear index
 TimeFrequency Distribution Tools
CohenDist — Choi William Distribution
 IWindowFT — Inverse Window Fourier Transform
 Interpol2 — Interpolates signal f (length N ) to a signal g (length 2N)
MakeWindow — Make artificial Window
 Ridge_WindowFT — Find Ridges of Window Fourier Transform
 Spectrogram — TimeVarying Spectrum
 TFDist_AF — AliasFree Generalized Discrete TimeFrequency Distribution
 WVDist — WignerVille Distribution
 WVDist_AF — AliasFree WignerVille Distribution
WignerDist — WignerDist  AliasFree WignerVille Distribution
 WindowFT — Window Fourier Transform
 Utilties for Writing Scripts
AutoImage — Image display of object assuming arbitrary values
CutDyad — Truncate signal to Dyadic length
GrayImage — Standard grayscale image display
HitAnyKey — Tool for pausing in scripts
LockAxes — Versionindependent axis command
PadDyad — Zerofill signal to Dyadic length
ShapeAsRow — Make signal a row vector
ShapeLike — Make 1d signal with given shape
UnlockAxes — Versionindependent axis command
WaitUntil — Burn up CPU cycles until sec seconds elapse from oldclock
WhiteNoise — Versionindependent white noise generator
 log2lin — takes a logscale image l , and transforms it into a linear scale image n
 rnshift — t circular right shift of 1d signal
This module provides 65 demonstrations:
 Basics of Matching Pursuit
 MatchingPursuit, Wavelet Packet Tour on Four Basic Signals
 MatchingPursuit, Wavelet Packet Tour on Four Complex Signals
 MatchingPursuit, WP and CP Tours on Transients Signal
 Illustrate TimeFrequency Tiling
Illustrate CP Analysis Techniques on SlowChirp
 Wavelet Packet Tour
 Cosine Packet Tour
 Illustrate CP/WP Analysis Techniques
 Compression Numbers on Four Signals
 CWT Analysis of Cantor Signal
 CWT Analysis of Brownian Signal
 Chapter 2 : Fourier Kingdom
 Chapter 4 : Time Meets Frequency
 Chapter 5 : Frames
 Chapter 6 : Wavelet Zoom
 Chapter 7 : Wavelet Bases
 Chapter 8 : Wavepackets and Local Cosine Bases
 Chapter 9 : An Approximation Tour
 Chapter 10 : Estimations Are Approximations
 1.1 Types of Wavelets
 1.2 Gender of Wavelets
 1.3 Scale Families of Wavelets
 1.4 Daubechies D4 Wavelets
 1.5 Wavelet Analysis of Functions
 1.6 MRA Analysis of Functions
 1.7 Smoothness of Wavelets
 1.8 Frequency Content of Wavelets
 2.1 Mesh Plots of four wavelets
 2.2 Image Plots of Four Wavelets
 2.3 2d Wavelet Analysis of Synthetic Objects
 3.1 Analysis of Smooth Signals
 3.3 Analysis of Singularities
 3.4 Comparison of Wavelet Types
 4.1 Partial Reconstructions
 4.2 Comparison of Two Wavelets
 4.3 Compression Number
 4.4 Comparison with other transforms
 4.5 Unconditional Basis Property
 5.1 Data Expansion
 5.2 Progressive Transmission
 5.3 Data Compression 1d
 5.4 Data Compression 2d Ingrid Image
 5.5 DeNoising
 5.6 Fast Algorithms
 7.1 Some Wavelet Packets
 7.2 Frequency Content of WP
 7.3 WP As TF Atoms
7.4 WP Decomposition of SlowChirp
 8.1 Some Cosine Packets
 8.2 Frequency Content of CP
 8.3 CP as TF atoms
8.4 CP Decomposition of SlowChirp
 10.0 Wavelet Packet Analysis
 11.0 Cosine Packet Analysis
 16.1 FBI Fingerprint
WaveLab and Reproducible Research
 Adapting to Unknown Smoothness via Wavelet Shrinkage
 Nonlinear Wavelet Methods for Recovery of Signals
 Wavelet Shrinkage and W.V.D.  A TenMinute Tour
 On Minimum Entropy Segmentation
 Smooth Wavelet Decomposition with Blocky Coefficient Kernals
 Wavelet Shrinkage: Asymptopia?
 TranslationInvariant DeNoising
The following plot is from the demo "FBI Fingerprint Compression". The United States Federal Bureau of Investigation uses a fixed Wavelet Packet basis to compress fingerprints. Here we illustrate the compression of a sample fingerprint in this basis. The following script is the first part of the demo.
finger = ReadImage('Fingerprint'); fbi_tree = BuildFBITree(9); subplot(211); AutoImage(finger); title('Fingerprint'); subplot(212); AutoImage(finger); a=gca(); ax = a.data_bounds; ax=ax(:)'; Plot2dPartition(fbi_tree,'y',ax,9); title('Partition by FBI Basis');
The previous script produces the following output.
The following plot shows first and best 10% reconstructions and the errors.
8th of March 2011: Particle Swarm Optimization Toolbox, v0.2
The Particle Swarm Optimization Toolbox by Sébastien Salmon was updated 8th of March 2011.
The PSO method, published by Kennedy and Eberhart in 1995, is based on a population of points at first stochastically deployed on a search field. Each member of this particle swarm could be a solution of the optimization problem. This swarm flies in the search field (of N dimensions) and each member of it is attracted by its personal best solution and by the best solution of its neighbours. Each particle has a memory storing all data relating to its flight (location, speed and its personal best solution). It can also inform its neighbours, i.e. communicate its speed and position. This ability is known as socialisation. For each iteration, the objective function is evaluated for every member of the swarm. Then the leader of the whole swarm can be determined: it is the particle with the best personal solution. The process leads at the end to the best global solution. This direct search method does not require any knowledge of the objective function derivatives.
This module provides the following functions:
 PSO_bsg_starcraft — PSO BSG Starcraft
 PSO_bsg_starcraft_radius — PSO BSG Starcraft radius
 PSO_inertial — PSO_inertial
 PSO_inertial_radius — PSO_inertial_radius
This project is managed on the Forge :
http://forge.scilab.org/index.php/p/psotoolbox/
and is available on ATOMS:
http://atoms.scilab.org/toolboxes/PSO
To install it:
atomsInstall('PSO')
15th of March 2011: FreeASM
FreeASM Scilab is a simple code and freely accessible to the simulation of activated sludge processes.
http://wwwimfs.ustrasbg.fr/en/content/FreeASM1
The author of this module is Julien Laurent, Lecturer at the Institute of fluid mechanics and solid (IMFS) of ENGEES in Strasbourg. FreeASM1 is a set of Scilab scripts to simulate a very easy method of activated sludge used to treat municipal wastewater.
 FreeASM1_batch.sce: This script simulates a process of type "batch", that is to say that a given stream is brought into contact with the purifying biomass in a closed reactor;
 FreeASM1_pointsettler_steady.sce: This script simulates an activated sludge process operated continuously connected to a clarifier with recirculation of settled sludge and extraction. The characteristics of the treated effluent are determined within the script and remain constant during the simulation (flow, concentrations)
 FreeASM1_pointsettler_dynamic.sce: This script simulates an activated sludge process operated continuously connected to a clarifier with recirculation of settled sludge and extraction. The characteristics of the treated effluent are determined in a text file and can vary during the simulation (flow, concentrations).
>exec FASM1+pointsettler_steady_state.sce; Q_inf = 500. Q_was = 20. Q_eff = 480. was = 0.04 Q_rec = 500. So_sat = 9. OK
The previous script produces the following figure.
23rd of March 2011: Crystal Structure Animation v2.0
This script has been developped by Tadayuki Nakajima. It displays animated crystal structures.
Crystal Structures
Sodium Chloride (NaCl) Structure
Caesium chloride (CsCl) Structure
 Hexagonal Closepacked (hcp) Structure
 Diamond Structure
 Zincblende (ZnS) Structure
Perovskite Structure (SrTiO3)
In the version 2.0, new structures are added:
 La0.33Sr0.67CoO3 Structure
 La0.5Sr0.5CoO3 Structure
HgBa2CuO4 Structure
For example, consider the following script:
//La0.33Sr0.67CoO3 (LSCO) Structure  clf(); //To clear the previous plot cf = gcf(); cf.pixmap = 'on'; cf.color_map = [bonecolormap(128);oceancolormap(384);coppercolormap(256);bonecolormap(256)]; ColormapSize = size(cf.color_map, "r")/8; //get the colormap size a1 = [1;0;0]; //a1,a2,a3 :primitive axes a2 = [0;1;0]; a3 = [0;0;1]; Co0 = [1/2 1/2 1/2]; Co = Co0+[0 0 0]; O = [Co0;Co0;Co0]+[[1/2 0 0];[0 1/2 0];[0 0 1/2]]; RA = [GetUnitCell(Co, 2:2, 0:2, 0:3);GetUnitCell(Co, 0:2, 2:2, 0:3);GetUnitCell(Co, 0:2, 0:2, 3:3)]; PlotAtoms(1, RemoveAtoms(GetUnitCell(Co, 0:2, 0:2, 0:3), RA), 0.07); PlotAtoms(8, GetUnitCell(O, 0:2, 0:2, 0:3), 0.05); a1 = [1;0;0]; //a1,a2,a3 :primitive axes a2 = [0;1;0]; a3 = [0;0;3]; Sr = [[0 0 1];[0 0 2]]*1/3; La = [0 0 0]; PlotAtoms(3, GetUnitCell(La, 0:2, 0:2, 0:1), 0.1); PlotAtoms(2, GetUnitCell(Sr, 0:2, 0:2, 0:1), 0.1); LaSr = [La;Sr]; ConnectAtoms(1, GetUnitCell(LaSr, 0:2, 0:2, 0:1), 1, 5/8*ColormapSize, 1); xtitle('$La_{0.33}Sr_{0.67}CoO_{3}\;(LSCO)\; Structure$'); ca = gca(); //get the current axes ca.tight_limits = "on"; ca.title.font_foreground = 6/8*ColormapSize; ca.title.font_style = 1; //1 to 10 ca.title.font_size = 4; n = 0; while n <= 360 ca.rotation_angles = [75, 300 + n]; show_pixmap(); n = n + 0.2; end
The previous script produces the following output.
Notice that we must set the pixmap field "off" before being able to export this figure:
cf = gcf(); cf.pixmap="off";
25th of March 2011: Low Discrepancy Sequences v0.2
This is the change log for version 0.2.
 Fixed sobol_startup.
 Improved the computation of Faure generator matrix (vectorization).
 Created lowdisc_ldgen function to simplify the generation of sequences.
 Updated the overview with a list of available sequences.
 Separated Halton and Sobol sequences as standalons functions.
 Created a separate .xml page for bad 2D projections.
 Added "speed" field for ldbase, so that the speed of each sequence can be known.
 Disabled optimization of source code for Sobol sequence. This lead to failure to compile on some operating systems.
 Updated tests to rely on assert module.
 Fixed startup/shutdown of fast sequence in case of error.
 Removed autogenerated demos for clarity.
This toolbox is available in ATOMS at :
http://atoms.scilab.org/toolboxes/lowdisc
and is managed in the Scilab Forge :
http://forge.scilab.org/index.php/p/lowdisc/
This module has already been reviewed at Low Discrepancy Sequences
27th of April 2011: Matrix Market v1.4
Here is the changelog for the version 1.4:
 Updated unit tests.
 Increased robustness with apifun.
 Updated help pages.
 Created separate unit test for mminfo.
 Created separate unit test for mmwrite.
 Created separate unit test for mmread.
 Added missing output argument comments to mmread.
 Fixed test.tst for matrices "*.mtx".
This module is available in ATOMS :
http://atoms.scilab.org/toolboxes/MatrixMarket
The is managed on the Forge since April 2011:
http://forge.scilab.org/index.php/p/matmark/
The version 1.4 is the result of the work of a new contributor to this project, Benoit Goepfert.
This module has already been reviewed at https://scilab.gitlab.io/legacy_wiki/New%20Scientific%20Features%20in%202009#A19th_November_2009__Matrix_Market_:_Read_and_Write_Matrix_Market_formatted_files.
6th of June 2011: Linear Algebra v0.1
The goal of this toolbox is to provide a collection of algorithms for linear algebra.
These algorithms are most of the time already provided by Scilab, but are available here for comparison purpose.
The linalg_pow function is much faster than Scilab's pow, when the exponent is large. The algorithm used here is based on binary exponentiation, and requires only log2(p) iterations, compared to p iterations for the naive pow. For example, for p=99999, it was found that linalg_pow requires 0.003 seconds for a 5by5 matrix, while Scilab requires 2.7 seconds.
The linalg_zhbev function provides the same feature as Lapack's ZHBEV, that is, computes the eigenvalues of a complex hermitian band matrix. The other method in Scilab to compute eigenvalues of sparse matrices is to use Arnoldi's iterations. This does not make use of the Hermitian structure of some matrices.
The following list presents the functions in this module:
 linalg_chol — Computes the Cholesky decomposition.
 linalg_condeig — Computes the condition number of the eigenvalues of a matrix.
 linalg_expm — Computes the exponential of a matrix.
 linalg_factorlu — Computes the LU decomposition without pivoting.
 linalg_factorlupivot — Computes the LU decomposition with pivoting.
 linalg_gaussnaive — Solves a linear equation by Gauss method and no pivoting.
 linalg_gausspivotal — Computes the solution of a linear equation with Gauss and row pivoting.
 linalg_gausspivotalnaive — Computes the solution of a linear equation with Gauss and row pivoting.
 linalg_hbandL — Converts a complex hermitian band matrix into its compact form.
 linalg_pow — Computes A^p
 linalg_powfast — Computes A^p
 linalg_rayleighiteration — Computes approximated a pair of eigenvalue and eigenvector.
 linalg_solvelu — Computes the solution of a linear equation, given its LU decomposition.
 BLAS/LAPACK
 linalg_dgemm — Computes D = Alpha*A*B+ Beta*C for a real matrix.
 linalg_dsyev — Computes the eigenvalues of a symmetric real matrix.
 linalg_zgemm — Computes D = Alpha*A*B+ Beta*C for a complex matrix.
 linalg_zhbev — Computes the eigenvalues of a complex hermitian band matrix.
The linalg project is managed on the Forge:
http://forge.scilab.org/index.php/p/linalg/
and available on ATOMS:
http://atoms.scilab.org/toolboxes/linalg
To install it, type in the Scilab console:
atomsInstall('linalg')
and restart Scilab.
The linalg_chol function returns the Cholesky decomposition of a matrix. Of course, Scilab already provides the "chol" function, which provides the same feature. The "chol" function is based on Lapack, which provides a robust and efficient Cholesky decomposition. The gateway of the "chol" function in Scilab is in the "linear_algebra" module:
From there, we see that, for a real matrix, Scilab uses the Lapack function dpotrf :
http://www.netlib.org/lapack/double/dpotrf.f
This prevents the user from being able to experiment how the algorithm of the Cholesky decomposition works: the code is in Fortran, not in the Scilab language itself. The goal of the linalg_chol function is to provide a Scilabbased Cholesky decomposition. Of course, this algorithm will be less efficient than Scilab's compiled source code. Even worst, Scilab uses optimized linear algebra libraries (e.g. ATLAS or the Intel MKL), so that the performance of the linalg_chol function may be disappointing. However, in the context of Scilab, we can edit the linalg_chol source code and experiment interactively much more easily than with a Fortran source code. Therefore, if we want to learn how the algorithm is designed (e.g. during a training session), analyzing the linalg_chol function is a much simpler way to work.
For example, consider the following matrix C:
C = [ 1 0 0 0 1 2 0 0 1 2 3 0 1 2 3 4 ];
We can create the symmetric matrix A by multiplying C by its transpose:
A = C*C';
This produces the matrix:
A = 1. 1. 1. 1. 1. 5. 5. 5. 1. 5. 14. 14. 1. 5. 14. 30.
Then we use the linalg_chol function to compute the Cholesky decomposition of A. The script
L=linalg_chol(A)
produces:
L = 1. 0. 0. 0. 1. 2. 0. 0. 1. 2. 3. 0. 1. 2. 3. 4.
The builtin "chol" function produces the same matrix (but transposed):
>chol(A) ans = 1. 1. 1. 1. 0. 2. 2. 2. 0. 0. 3. 3. 0. 0. 0. 4.
The difference is that we can edit the linalg_chol function, simply by editing its source code. The statement:
>edit linalg_chol
opens Scilab's editor and let the user read the source code of the linal_chol function. At the core of the algorithm, we see the following simple Cholesky decomposition algorithm:
for j=1:n if ( j > 1 ) then A(j:n,j) = A(j:n,j)  A(j:n,1:j1)*A(j,1:j1)' end if (A(j,j)<=0  isnan(A(j,j))) then error(msprintf("%s: The matrix is not positive definite.","linalg_chol")) end A(j,j) = sqrt(A(j,j)) A(j+1:n,j) = A(j+1:n,j)/A(j,j) end L = tril(A)
8th of June 2011: Mathieu functions v2.0
This Mathieu Functions Toolbox is used to solve Mathieu function numerically.
The Mathieu equation is a secondorder homogeneous linear differential equation
and appears in several different situations in Physics: electromagnetic or elastic wave equations with elliptical boundary conditions as in waveguides or resonators, the motion of particles in alternatedgradient focussing or electromagnetic traps, the inverted pendulum, parametric oscillators, the motion of a quantum particle in a periodic potential, the eigenfunctions of the quantum pendulum, are just few examples. Their solutions, known as Mathieu functions, were first discussed by Mathieu in 1868 in the context of the free oscillations of an elliptic membrane.
The toolbox has 8 demos. All demos can be acessed from "?>Scilab Demonstrations"
This module provides the following functions:
 mathieu_cart2ell : Converts from cartesian to elliptical coordinates.
 mathieu_ell2cart : Converts from elliptical to cartesian coordinates.
 mathieu_ellipse : 3D plot of a mode with elliptical boundary conditions.
 mathieu_elliptical : 3D plot of a mode with elliptical boundary conditions.
 mathieu_expqa : Plot nu with respect to q and a.
 mathieu_mathieu: Evaluates periodic Mathieu functions.
 mathieu_mathieuS: Calculates solutions of Mathieu Equation.
 mathieu_mathieuexp: Evaluates the characteristic exponent.
 mathieu_mathieuf: Evaluates characteristic values and expansion coefficients.
This module is developped on Scilab's Forge:
http://forge.scilab.org/index.php/p/mathieu/
This module is available on ATOMS:
http://atoms.scilab.org/toolboxes/Mathieu
The orignal authors of this toolbox are R.Coisson and G. Vernizzi from Parma University. Then the toolbox has been developped by X. K. Yang and is currently developped and maintained by Nikolay Strelkov and Michaël Baudin.
The toolbox provides the following demonstrations:
 Plots of ce, se (z,q) of order 05 for q=1,10 for comparison with Abramowitz and Stegun", "ce_se_plots_2d.sci"; ..
 Tables of ce and ce` (z,q) for comparison with Abramowitz and Stegun
 Tables of se and se` (z,q) for comparison with Abramowitz and Stegun
 Plots of ce, se (z,q) of order 03 for q=030 and z=[0, π]
 Comparison of 2 modes with q=0 and q=8, even
Comparison of 4 modes with q=0 and q=8, even & odd
 3D plot of a mode with elliptical boundary conditions
 Provaell
The mathieu_elliptical function creates a 3D plot of a mode with elliptical boundary conditions. This function is used in the demo "Comparison of 4 modes with q=0 and q=8, even & odd", which uses the following script:
h=scf(); n=3; m=2; subplot(2,2,1) mathieu_elliptical('e',n,m,0.1); set(gca(),"isoview","on"); set(gca(),"data_bounds",[20,20,20,20]); set(gca(),"tight_limits","on"); set(gca(),"rotation_angles",[0,90]); subplot(2,2,2) mathieu_elliptical('e',n,m,8); set(gca(),"isoview","on"); set(gca(),"data_bounds",[2.2,2.2,2.2,2.2]) set(gca(),"tight_limits","on"); set(gca(),"rotation_angles",[0,90]); subplot(2,2,3) mathieu_elliptical('o',n,m,0.1); set(gca(),"isoview","on"); set(gca(),"data_bounds",[20,20,20,20]); set(gca(),"tight_limits","on"); set(gca(),"rotation_angles",[0,90]); subplot(2,2,4) mathieu_elliptical('o',n,m,8); set(gca(),"isoview","on"); set(gca(),"data_bounds",[2.2,2.2,2.2,2.2]) set(gca(),"tight_limits","on"); set(gca(),"rotation_angles",[0,90]);
The previous script produces the following plot.
20th of July 2011: New Module: NIST Datasets v0.2
The goal of this toolbox is to provide a collection of datasets distributed by NIST.
The NIST Standard Reference Datasets is a collection of datasets. The purpose of this project is to improve the accuracy of statistical software by providing reference datasets with certified computational results that enable the objective evaluation of statistical software.
See the overview in the help provided with this toolbox.
The following is a list of functions in this toolbox.
 nistdataset_getpath — Returns the path to the current module.
 nistdataset_read — Reads a dataset from NIST
Moreover, the module provides 34 datasets from NIST in the following categories:
 Univariate Summary Statistics (9 datasets)
 Non Linear Least Squares (25 datasets)
Datasets from other categories are provided on the NIST website, which cannot be read by the current toolbox. However, it should be straightforward to extend the current toolbox to read the other categories of files.
This module is developped on the Forge :
http://forge.scilab.org/index.php/p/nistdataset/
and is available on ATOMS:
http://atoms.scilab.org/toolboxes/nistdataset
To install it, type:
atomsInstall('nistdataset')
The nistdataset_read function reads a dataset from NIST. In the following example, we read the Gauss2 dataset in Scilab.
path = nistdataset_getpath(); filename = fullfile(path,"datasets","nls","lower","Gauss2.dat"); data = nistdataset_read(filename)
The previous script produces the following output:
>data = nistdataset_read(filename) data = NISTDTST Object: =========== name: Gauss2 category: Nonlinear Least Squares Regression description: The data are two slightlyblended Gaussians on a decaying exponential baseline plus normally distributed zeromean noise with variance = 6.25. reference: Rust, B., NIST (1996). datastring: 1 Response (y) 1 Predictor (x) 250 Observations Lower Level of Difficulty Generated Data model: Exponential Class 8 Parameters (b1 to b8) residualSumOfSquares: 1247.5282 residualStandardDev: 2.270479 degreeFreedom: 242 numberOfObservations: 250 x: 250by1 constant matrix y: 250by1 constant matrix start1: 8by1 constant matrix start2: 8by1 constant matrix parameter: 8by1 constant matrix standarddeviation: 8by1 constant matrix sampleMean: [] sampleSTD: [] sampleAutocorr: []
From there, it is easy to access to the x and y fields of the data structure:
>size(data.x) ans = 250. 1. >data.x ans = 1. 2. 3. 4. 5. [...] >size(data.y) ans = 250. 1. >data.y ans = 97.587761 97.763443 96.567047 92.52037 91.15097 95.217278 [...]
For example, the following script:
scf(); plot(data.x,data.y,"bo")
The previous script produces the following output:
27th of July 2011: CelestLab v2.2.0
CelestLab is a library of space flight dynamics functions written in Scilab. This library has been developed and is maintained by the CNES (Centre National d’Etudes Spatiales) for mission analysis purposes. The library is used by CNES for the trajectory analysis and orbit design for various type of missions. CelestLab contains about ten modules that allow to perform various tasks such as: orbit extrapolation, attitude computation, elementary manoeuvre computation, change of reference frame, change of coordinates,…CelestLab has been validated against the CNES flight dynamics software legacy. Every function, is described, in its own help page with selected examples.
This module is available in ATOMS :
http://atoms.scilab.org/toolboxes/celestlab
To install it, type
atomsInstall('celestlab')
This module has already been reviewed at: