help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Same script for octave/matlab


From: Joao Cardoso
Subject: Re: Same script for octave/matlab
Date: Thu, 07 Oct 1999 19:50:42 +0100

Ketil Froyn wrote:

> Hi.
> I use octave at home and matlab at my university. What I would like to
> know is if I can somehow differentiate between matlab and octave from a .m
> file, eg:
>
> ------
> x=0:0.1:2*pi;
> y=sin(x);
>
> if (THIS_IS_MATLAB)

use something like:

    if exist("octave_config_info")

>
>   plot(x,y);
>   print output.eps;
> elseif (THIS_IS_OCTAVE)
>   gset terminal postscript eps
>   gset output "output.eps"
>   plot(x,y);
>   gset terminal x11
>   gset output
> endif
> ------
>
> This also brings me on to another question. Is there some way I can check
> what terminal and output are, so that they can be changed back correctly?
>
> And finally, (and probably most importantly), has someone made a function
> like print for octave? Is it possible to take whatever is in the gnuplot
> window and output that to a postscript file without calling plot again?

This is a FAQ, please see the archives.

>
>
> Sorry if all this is old stuff, but I couldn't find a search function for
> the archive.

but your browser has a search function, hasn't it?

> I looked through some of the 1999 archive, but didn't find
> anything.
>
> --
> Ketil Froyn                             The probability of someone
> University of Oslo                      watching you is proportional
> Norway                                  to the stupidity of your action.
>
> ---------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.  To ensure
> that development continues, see www.che.wisc.edu/octave/giftform.html
> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
> ---------------------------------------------------------------------

--
Joao Cardoso                |   e-mail: address@hidden
INESC, R. Jose Falcao 110   |   tel:    + 351 2 2094322
4050 Porto, Portugal        |   fax:    + 351 2 2008487





---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]