[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to check for availability of functions in core octave
From: |
Ben Abbott |
Subject: |
Re: How to check for availability of functions in core octave |
Date: |
Fri, 29 Jul 2011 14:42:23 -0400 |
On Jul 29, 2011, at 2:32 PM, PhilipNienhuis wrote:
> Is there a user-function for checking if some function is present in core
> Octave?
> Something like
> isimplemented ("erfcx")
> ?
>
> I'm looking at pkg.m to see if some check can be implemented there to skip
> copying m-files for which equivalent (and probably better) functionality is
> in core octave. This is somewhat motivated by:
>
> http://sourceforge.net/mailarchive/message.php?msg_id=26792800
>
> and some experiences with maintenance of octave-forge packages.
>
> Philip
Does this do what you want?
>> isimplemented = @(fun) exist (strcat(fun,".m")) == 2 || exist (fun) > 2;
>> isimplemented ("residue")
ans = 1
>> isimplemented ("erfcx")
ans = 1
Ben