% TP_MLP_AEROSOLS_STARTUP initialisation of matlab/octave environment for TP_MLP_AEROSOLS project

%+
%
% module
% ======
%
% initialisation of matlab/octave environment for TP_MLP_AEROSOLS project
%
% DESCRIPTION
% ===========
%
% Detect if either octave or matlab running.
%
% Set up help Character Encoding.
% cf http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/index.html?/access/helpdesk/help/toolbox/simulink/slref/slcharacterencoding.html&http://www.google.fr/search?q=slCharacterEncoding&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
%
% This file can be either run classicaly when currect directory
% is ${TP_MLP_AEROSOLS} :
%
% ..
%
%  >> tp_mlp_aerosols_startup
%
%
% If linked or copy to ./startup.m, it will be automaticaly
% run by matlab at start.
%
% If linked or copy to ${HOME}/.octaverc, it will be automaticaly
% run by octave at start.
%
% SEE ALSO
% ========
%
% tp_mlp_aerosols_profile.sh_
%
% .. _tp_mlp_aerosols_profile.sh : tp_mlp_aerosols_profile.sh.html
%
% EVOLUTIONS
% ==========
%
% $Id$
%
% - fplod 2009-09-09T14:49:20Z aedon.locean-ipsl.upmc.fr (Darwin)
%
%   * ``run_octave`` is now a global variable
%
% - fplod 2009-09-08T10:51:15Z aedon.locean-ipsl.upmc.fr (Darwin)
%
%   * application name and version. These strings can be use to
%     name saved files and make comparison easier.
%
% - fplod 2009-08-17T15:41:11Z ajax.locean-ipsl.upmc.fr (Linux)
% 
%   * find syntax to define help Character Encoding in octave and matlab
%
% - fplod 2009-08-12T15:26:01Z aedon.locean-ipsl.upmc.fr (Darwin)
%
%   * creation inspired of equivalent feature in IRCAAM project
%
% TODO
% ====
%
% Define :
%  - path for matlab/octave commands used in TP_MLP_AEROSOLS project
%  - IO directories in global variables
%
% not yet done because of specific meaning of private and toolbox in matlab
%
% check if set_param(0,'CharacterEncoding','ISO-8859-1') is a better solution
% than slCharacterEncoding('ISO-8859-1')
%
%-
%
clear all
%
global run_octave
%
% detect if either octave or matlab running
if ~ exist('OCTAVE_VERSION','builtin')
 run_octave=0;
 application='matlab';
 application_version=version('-release');
else
 run_octave=1;
 application='octave';
 application_version=version();
end
%
if (run_octave == 0)
 % to display help written in ISO-LATIN
 slCharacterEncoding('ISO-8859-1');
end
%
more on
