Søren Hauberg wrote:
> tor, 29 04 2010 kl. 18:42 +0200, skrev Alois Schlögl:
>> A number of core functions like  toascii(), tolower(), toupper(), 
>> rows(), columns(), etc. are not provided by matlab, and freetb2matlab 
>> does not generate them because these are builtins in octave only.
>> If these are not provided, a large number of the converted functions 
>> could not be used with matlab.
> 
> I assume that oct2mat generates a new set of files to be distributed to
> the Matlab users. If so, why not just store 'toascii', 'tolower', etc.
> as text strings inside oct2mat and generate them when creating the
> Matlab compatible code? That way these functions would never have the
> chance to interfere with Octave (which is a huge issue).
> 
> Søren
> 



I followed your suggestion, and it works well.

I've also improved oct2mat. The following cases are now properly 
handled. blah ( blah1 <NEWLINE> blah2) -> blah ( blah1 ...<NEWLINE> 
blah2) And the use of some obsolete functions like t_cdf, is_matrix are 
also taken into account.
I was looking into signal and statistics toolbox, and found that
over 30 functions (mostly in statistics) benefit from this change.
Functions in other toolboxes might benefit as well.

Coding styles that are still not properly handled are:
     [0,blah()](1:n), [1:10](3:5)
     blah()(1:n), (1:10)(3:5)
     num2cell(1:n)(3:5), {1,2,3,4,5,6,7}(3:5)
and
     a = b = c = d

This concerns the functions
    signal/freqz
    statistics/distributions/discrete_cdf


Further tests are welcome. You need awk (available on any unix system).
Binaries for win32 are available from here:
   http://gnuwin32.sourceforge.net/packages/gawk.htm
   http://cm.bell-labs.com/cm/cs/awkbook/

1) Include path to oct2mat
         addpath $HOME/octave-forge/extra/oct2mat/inst
2) convert Octave/scripts
         freetb4matlab  $HOME/octave/scripts /tmp/freetb
3) convert Octave-forge
         freetb4matlab  $HOME/octave-forge /tmp/freetb


Alois

------------------------------------------------------------------------------
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to