octave-maintainers
[Top][All Lists]
Advanced

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

Re: demo scripts for plots


From: Rik
Subject: Re: demo scripts for plots
Date: Tue, 24 Jun 2014 13:08:03 -0700

On 06/24/2014 11:49 AM, address@hidden wrote:
> Message: 6
> Date: Tue, 24 Jun 2014 14:32:04 -0400
> From: "John W. Eaton" <address@hidden>
> To: Andreas Weber <address@hidden>, address@hidden
> Subject: Re: sombrero default argument (matlab compatibility)
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
>
> On 06/24/2014 02:26 PM, Andreas Weber wrote:
>> > Am 24.06.2014 19:48, schrieb Andreas Weber:
>>> >> Dear maintainers,
>>> >>
>>> >> Changeset befb99c0c72f
>>> >> (http://hg.savannah.gnu.org/hgweb/octave/rev/befb99c0c72f) makes uses of
>>> >> default arguments which are incompatible with matlab. I would like to
>>> >> undo this
>>> >>
>>> >> -function [x, y, z] = sombrero (n = 41)
>>> >> +function [x, y, z] = sombrero (n)
>>> >> +
>>> >> +  if (nargin == 0)
>>> >> +    n = 41;
>>> >> +  endif
>>> >>
>>> >> to be able to run sombrero in matlab to compare plots.
>>> >>
>>> >> Any hints or pitfalls I'm not aware off?
>> >
>> >
>> > I've should better have asked:
>> > Are there any objections making octave scripts matlab compatible? I also
>> > want to replace double quotes with single quotes in demo blocks.
> Yes, I object.
>
> jwe
I don't see any reason to change our script files, like sombrero, to match
Matlab.

But I don't object to having the plot %!demo blocks in Matlab format.  This
has already been done for the demo blocks in the plot directory
specifically to make use of the compare_plots routine.  line.m is a good
example in that the %!demo block uses single quotes, but the %!test block
uses double quotes because it is Octave-only.  If we are really bothered by
this we could recode the demo blocks using Octave conventions and then run
oct2mat on the demo blocks when generating the compare plots script.

--Rik



reply via email to

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