ons, 28 04 2010 kl. 12:08 -0700, skrev Søren Hauberg:
> ons, 28 04 2010 kl. 20:10 +0200, skrev Alois Schlögl:
> > Concerning these functions for Matlab users - I'm not sure were else 
> > they should go. If you have a suggestion, let me know.
> > 
> > Would it be possible to install packages at the end of the path (like 
> > the "-end" option in addpath)? If this is possible, these functions get 
> > into scope only when the standard engine does not provide them.
> 
> One option would be to put these functions in a separate directory
> ('octave_combat'?) and only add this directory to the path when using
> Matlab. In Octave you should be able to add the 'addpath' to a 'PKG_ADD'
> file. I don't know how to do something like that in Matlab.

Replying to myself here...

What I am suggesting is that we create a directory 'inst/octave_compat'
and put the function that Matlab users will need in this directory. We
then create 'inst/startup.m', which should contain something like

  if (~exist (OCTAVE_HOME))
    %% We are in Matlab
    inst_dir = fileparts (mfilename ('fullpath'));
    addpath (fullfile (inst_dir, 'octave_compat'));
  end

Would that be acceptable?

I must say that I am a bit confused about this situation. I thought the
purpose of the 'oct2mat' package was to provide Octave-users some
mechanism for converting their code into something Matlab users can use.
Is this correct? If so, why would any Matlab users install this package
(wouldn't it only be used by Octave users?) ? Or rather why are these
functions in the package in the first place?

Søren


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

Reply via email to