Re: Questions regarding Octave



"Eric Jacobsen" schrieb

Well, I tried that and resaving it with either Wordpad
or [Notepad] didn't make any difference.

Well, if you see a multiple-lines file as a multiple-lines
file in Notepad, then it isn't this problem of CR/LF (DOS)
and CR (Unix) line-ends.


HOWEVER, somewhere along the way of porting all this crap
across numerous machines (all Windows-based, btw), the
filename and extension became all caps, i.e., BUTTGEN.M.
So I renamed the file to buttgen.m and PRESTO!
It works. Jeebuz.

You probably ported between FAT (case-insensitive) and NTFS
(case-sensitive, at least on the file-system level, the CMD shell
seems to ignore that).


Quick follow-up: The problem appears to be two-fold: the
extension needs to be lower case, and the file name is
case-sensitive. Even if the extension is lower case if
the filename is typed in wrong, e.g., if it's mixed-case
and you get one letter wrong, it's wrong.

The irritating thing is that this results in the bizarre
"undefined near line xx column yy" error rather than,
"can't find that file" or something actually useful.

Well, for MATLAB and Octave, a function foo is undefined,
so that's why it yells "undefined 'foo' near line ...".
foo could be in the file you're executing right now or
in its own file foo.m. Not being defined, Octave has no
way to know where it might be.

So, does it really find the file and just not interpret
it correctly, which is a little odd,

In that case you'd get an error saying "bar" undefined in "foo.m"
near line xx column yy.

or is it just making stuff up? ;)
I don't think so. But I think MATLAB does the same in such a
situation.


Strange and unhelpful in any case, but I've now got all sorts
of files running doing useful things. It does appear that
the plotting functions are a bit to get used to and may have
lost some functionality from the last version of Matlab
that I was used to, but I need to get into that a bit further.

Or you'll just have to get used to it. In any case, you can export
the data to a separate file and plot them directly with Gnuplot,
where you'll have access to the usual figure-handling routines.

The plot window discipline
seems a bit off as well, since it'll intrude into a Remote Desktop
window and that's very unusual and I'd consider it a bug.

Huh? Works as expected here (with the exception that I haven't found
out how to zoom in/out on a plot window).

Regards
Martin


.



Relevant Pages

  • Re: Dealing with source code
    ... I suspect it is Notepad that is adding ... the .txt extension to the file. ... If you tell it to save to foo, ... I would expect other Windows text editors and other program to behave ...
    (comp.lang.c)
  • Re: c:winntsystem32driversetchosts
    ... You can create a file in the "etc" directory with notepad and place the ... automatically will add the extension of a text file, ... "hosts" it will have the .txt extension. ... When you use the information off the website above it tells your ...
    (microsoft.public.win2000.general)
  • Re: Use another editor in Matlab ?
    ... > Because Notepad++ is much more comfortable than the standard ... > Matlab editor I would like to open and edit all Matlab files ... Another great feature in Notepad++ is when you double-click a word to highlight it, it will automatically highlight all other instances of the word on the screen, so you can immediately see where a variable is being used. ...
    (comp.soft-sys.matlab)
  • Re: A special P.S. text editor?
    ... i personally use either Notepad++, or ConTEXT depending on my mood. ... both are free and provide nice syntax highlighting, ... the .txt extension, and also then a save as, and then ...
    (comp.lang.postscript)
  • Re: HTML Signature with Picture Logo
    ... Saving as a HTM file is not a problem. ... Even if the file is saved with the extension this can be changed by ... in html format. ... and paste it into a new Notepad window. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)