help-octave
[Top][All Lists]
Advanced

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

RE: addpath, undefined functions


From: Summers, Peter
Subject: RE: addpath, undefined functions
Date: Wed, 13 Jul 2011 00:59:54 +0000

Ok, I've made some progress on this but now I have a really basic question.

First to recap: I downloaded some matlab files, put them in a directory (first 
within octave, then outside), pointed to them with addpath, and octave doesn't 
see them. They show up with "dir" and "edit", and are definitely where they're 
supposed to be. I'm working under windows 7 and there are no 
administrator-privilege issues (unless they're buried). I've checked pathnames 
etc for typos (none), and there are no errors that I can see in the downloaded 
functions.

Philip's suggestion of a 'test' program, and the fact that it worked (apart 
from conflicting with an internal octave command) gave me an idea. I opened 
'coher.m' (one of the afore-mentioned files), opened a new file in notepad++, 
copied coher.m verbatim into the new file, saved it under a new name ('new.m' 
-- after changing the name in the 'function' command), and gave it a try.

It worked! It calls another of my downloaded functions and I get the same 
'undefined' error on that line, but now octave is clearly seeing a function 
that's been there all along. 

So...do I need to do this for every one of my (9,372) matlab files in order for 
octave to be useful to me???? 

I'm a user of matlab, potentially of octave. I can program pretty well in that 
environment, but am clueless when it comes to getting into the underlying 
structure (c++, java, whatever). And I'm just getting used to Win 7. So does 
this sound like something other than a trivial glitch? 

PS
________________________________________
From: address@hidden address@hidden on behalf of Summers, Peter address@hidden
Sent: Tuesday, July 12, 2011 9:23 AM
To: Philip Nienhuis; address@hidden
Subject: RE: addpath, undefined functions

Thanks again, Philip. More answers below...

<snip>
>(please do "reply all" so others can follow. address@hidden
>added to To:)

sorry, I thought I was replying to the list.

<snip>
>(Is the ampersand position a typo? especially given the output of your
>path() command, where it says:
>"
>Octave's search path contains the following directories:
>C:\users\Bob & Alice\Documents\octave
>")

yes, there was a typo in my response. I had it right in the 'addpath' command.

<snip>
>Is function coher in a file called coher.m ?

yes

<snip>
>Nevertheless, as internal test() isn't "shadowed" we can conclude your
>test.m isn't seen.

It works if I call it from the local directory.

>Wat if you do (in Octave):
>  cd ('C:\users\Bob & Alice\Documents\octave')
>  dir

>Does coher.m show up?

yes -- that's one of the things that's so weird (and maddening!) about this 
problem. the functions are clearly there and the path includes their directory, 
but octave doesn't see them.

<snip>
>Yes, this helps to clarify.
>But unfortunately I have run out of ideas; I don't have win7, only XP.
>All I can say is that usually these type of seemingly enigmatic errors
>are caused by simple glitches of the typo/forgot-to-copy/etc. variety.

that's always a possibility, but I'm pretty sure it's not the case here. I've 
tried this multiple times using the same steps I'd use in matlab. BTW, I've 
also made sure that I have read/write access to the relevant directories. There 
may be some deeper administrator-privilege issue that I'm not aware of though...

PS
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave


reply via email to

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