[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can a script tell if it's running on Octave or Matlab?
From: |
Frederic Gobry |
Subject: |
Re: How can a script tell if it's running on Octave or Matlab? |
Date: |
Tue, 29 Sep 1998 09:27:22 +0200 |
Hi,
This doesn't solve your problem directly, but for specific cases (like using
varargs in functions) you can look at the attached script. It uses m4 (in
its current incarnation, one has to use GNU m4) to help generating two
versions out of one main file. For example, you can write in a .m file :
%in_matlab(
... some matlab specific stuff ...
%)
%in_octave(
... octave code ....
%)
and then use
m-specific octave source_file.m target.m
or m-specific matlab source_file.m target.m
to generate a file containing the parts that correspond to a given platform.
Hope this helps,
Frédéric
--
Frédéric GOBRY IDIAP
Rue du Simplon 4,
Research Assistant CH 1920 - Martigny
Machine Learning Group Tel: +41 27 721 77 31
m-specific
Description: Text document