octave 4.0.3 issue

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

octave 4.0.3 issue

Bradley D. Slagle

Octave 4.0.3

 

On some Windows 10 v1511 x64 computers, when trying to run a function an error occurs, line 1, column 1 not recognized. Which is the word “function”.

 

Does anyone have any ideas how to correct the issue?  The computers are in a lab used for class.

 

Thank you for the help.

 

-Brad Slagle

Systems Administrator

814-393-1912


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

karl
Am 19.09.2016 um 21:37 schrieb Bradley D. Slagle:

Octave 4.0.3

 

On some Windows 10 v1511 x64 computers, when trying to run a function an error occurs, line 1, column 1 not recognized. Which is the word “function”.

 

Does anyone have any ideas how to correct the issue?  The computers are in a lab used for class.

 

Thank you for the help.

 

-Brad Slagle

Systems Administrator

814-393-1912



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

Maybe you read the manual. You can't run a function, only a script. The difference is explained in the manual.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

Andreas Weber-6
In reply to this post by Bradley D. Slagle
Hi Bradley,

Am 19.09.2016 um 21:37 schrieb Bradley D. Slagle:
> On some Windows 10 v1511 x64 computers, when trying to run a function an
> error occurs, line 1, column 1 not recognized. Which is the word “function”.

Please explain what you are doing. You are using the GUI, right?

How do you try to "run a function"?

Thank you, Andy

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

Bradley D. Slagle
Hi.
        I have attached the error message.  I think it might be an issue with the function file name.  Is it possible, if the function name file already existed and I try to over write the existing function file it would cause this issue?

Thank you for helping me.

-Brad

-----Original Message-----
From: Andreas Weber [mailto:[hidden email]]
Sent: Tuesday, September 20, 2016 11:21 AM
To: Bradley D. Slagle <[hidden email]>; [hidden email]
Subject: Re: octave 4.0.3 issue

Hi Bradley,

Am 19.09.2016 um 21:37 schrieb Bradley D. Slagle:
> On some Windows 10 v1511 x64 computers, when trying to run a function
> an error occurs, line 1, column 1 not recognized. Which is the word "function".

Please explain what you are doing. You are using the GUI, right?

How do you try to "run a function"?

Thank you, Andy

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

Octave-Error.pdf (319K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

Andreas Weber-6
Am 20.09.2016 um 18:06 schrieb Bradley D. Slagle:
> I have attached the error message.  I think it might be an issue with the function file name.  Is it possible, if the function name file already existed and I try to over write the existing function file it would cause this issue?
> Thank you for helping me.

Do you save the file as "TEST" or "TEST.m"? Btw, the error message in
the pdf is a different one than previously posted.
-- Andy


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

Bernardo Sulzbach
In reply to this post by Bradley D. Slagle
Just throwing the possibility out there: are you saving this file in the
current directory?

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

Bradley D. Slagle
In reply to this post by Andreas Weber-6
I save it as just test but the program adds the .m.  So, the file shows the .m when using explorer.  I apologize for not stating the problem correctly.

-Brad

-----Original Message-----
From: Andreas Weber [mailto:[hidden email]]
Sent: Tuesday, September 20, 2016 12:13 PM
To: Bradley D. Slagle <[hidden email]>; [hidden email]
Subject: Re: octave 4.0.3 issue

Am 20.09.2016 um 18:06 schrieb Bradley D. Slagle:
> I have attached the error message.  I think it might be an issue with the function file name.  Is it possible, if the function name file already existed and I try to over write the existing function file it would cause this issue?
> Thank you for helping me.

Do you save the file as "TEST" or "TEST.m"? Btw, the error message in the pdf is a different one than previously posted.
-- Andy


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

c.-2
In reply to this post by Bradley D. Slagle

Il 20 set 2016 6:07 PM, "Bradley D. Slagle" <[hidden email]> ha scritto:
>
> Hi.
>         I have attached the error message.  I think it might be an issue with the function file name.  Is it possible, if the function name file already existed and I try to over write the existing function file it would cause this issue?
>
> Thank you for helping me.
>
> -Brad
>

Hi,

You need to save your function to a file before you can use it.

In Octave and Matlab the file name must be the same as the name of the function it contains with the extension .m added.

The file must be stored somewhere in octave's path in order to use it.

All this is explained in detail in the manual chapter on scripts and functions (I suspect you actually intended to write a script not a function) but that may be a bit hard to read if you start completely from scratch.

I instead suggest you go through one of the infinitely many Octave/Matlab step-by-step tutorials for absolute beginners that exist out there before you try to write your own functions.

c.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

c.-2
In reply to this post by Bradley D. Slagle

Il 20 set 2016 6:19 PM, "Bradley D. Slagle" <[hidden email]> ha scritto:
>
> I save it as just test but the program adds the .m.  So, the file shows the .m when using explorer.  I apologize for not stating the problem correctly.
>
> -Brad
>
>

Octave language is case sensitive test and TEST are not the same thing.
c.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

Andreas Weber-6
In reply to this post by Bradley D. Slagle
Am 20.09.2016 um 18:18 schrieb Bradley D. Slagle:
> I save it as just test but the program adds the .m.  So, the file shows the .m when using explorer.  I apologize for not stating the problem correctly.

Have you saved it as TEST.m or test.m? GNU Octave is case sensitive so
if you name your function FOOBAR the filename has to be FOOBAR.m

-- Andy

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

Bradley D. Slagle
In reply to this post by c.-2

I think I have a clearer understanding of the issue.  I have attached the issue.  W: is a mapped drive.

 

Is there a way to fix the issue without having to do a “refresh”?

 

 

-Brad

 

From: Carlo de Falco [mailto:[hidden email]]
Sent: Tuesday, September 20, 2016 12:22 PM
To: Bradley D. Slagle <[hidden email]>
Cc: Andreas Weber <[hidden email]>; Octave Help <[hidden email]>
Subject: RE: octave 4.0.3 issue

 

Il 20 set 2016 6:19 PM, "Bradley D. Slagle" <[hidden email]> ha scritto:
>
> I save it as just test but the program adds the .m.  So, the file shows the .m when using explorer.  I apologize for not stating the problem correctly.
>
> -Brad
>
>

Octave language is case sensitive test and TEST are not the same thing.
c.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

Octave-Fix.pdf (390K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

nrjank

On Sep 22, 2016 5:22 PM, "Bradley D. Slagle" wrote:
> Is there a way to fix the issue without having to do a “refresh”?

Ok what you're talking about isn't a refresh. You're changing Octave's working directory. Octave generally  has no idea where your working files are located. It knows where its own files are located. It knows what folder you are currently working in. It also knows if you have specifically told it to look anywhere else for files. When you are in the W Drive comma it's like telling the program to find something in the room that you're currently in. When you are in a different Drive or folder it's like you asking it to find something in the room that you're in even though you know that the item is located in another room.

I believe the ad path function can be used to tell octave where else I can look for files if that is what you want to do


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

nrjank

On Sep 22, 2016 8:02 PM, "Nicholas Jankowski" <[hidden email]> wrote:
>
<snip>
Apologies. Speech-to-text and prematurely hitting the send button are not a good combination.

The function I mentioned is:
addpath

Note that it only let's octave find functions to run, not data files.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: octave 4.0.3 issue

Bradley D. Slagle

I have still have not described issue well enough.  I will try harder.  I have attached another document trying to explain the issue.

 

-Brad

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nicholas Jankowski
Sent: Thursday, September 22, 2016 8:06 PM
To: Bradley D. Slagle <[hidden email]>
Cc: help <[hidden email]>; Carlo de Falco <[hidden email]>
Subject: RE: octave 4.0.3 issue

 

On Sep 22, 2016 8:02 PM, "Nicholas Jankowski" <[hidden email]> wrote:
>
<snip>
Apologies. Speech-to-text and prematurely hitting the send button are not a good combination.

The function I mentioned is:
addpath

Note that it only let's octave find functions to run, not data files.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

Octave vs Matlab.pdf (523K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

nrjank
On Tue, Sep 27, 2016 at 10:37 AM, Bradley D. Slagle <[hidden email]> wrote:

I have still have not described issue well enough.  I will try harder.  I have attached another document trying to explain the issue.

 

-Brad

 

 


ok, using your examples I'm able to recreate some of what you're seeing. I only see this when working from a network drive. Note if I kept reissuing the same command, Octave eventually would find and run the function.  I assume there is some sort of 'refresh' delay in the interpreter. even though the file shows up immediately in the File Browser window.

Here's a pared down version of the issue. Maybe with some discussion we can figure out if this is a bug that should be filed (I suggest yes):

*the following was done first on my local hard drive with no issue, then I went to
Octave 4.0.3, 32bit, windows zip file installer

Outside of Octave I created the folder M:\temp\testdata

Octave interpreter:

>> cd m:\temp\testdata
>> edit

in the editor, added the following two lines:

function test21
b = 12345

gui saved the file as test21.m in the folder created. Octave's File Browser window showed the test21.m file

Octave interpreter:

>> test21
error: 'test21' undefined near line 1 column 1

>> test21
b = 12345

created a test11 file in the gui, saved it, it showed up right away in the file browser
>> test11
error: 'test11' undefined near line 1 column 1

>> test11
error: 'test11' undefined near line 1 column 1

>> test11
error: 'test11' undefined near line 1 column 1

>> test11
b = 123456789


So, now that I can recreate the issue, can anyone explain why this occurs?

Nick J.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

nrjank

*the following was done first on my local hard drive with no issue, then I went to

sorry, clipped text again.  I went to a non-local network share (the M: drive indicated), a not-too slow but non-zero latency personal network drive.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave 4.0.3 issue

nrjank

On Sep 27, 2016 12:34 PM, "Nicholas Jankowski" <[hidden email]> wrote:
>
>
>> *the following was done first on my local hard drive with no issue, then I went to
>>
> sorry, clipped text again.  I went to a non-local network share (the M: drive indicated), a not-too slow but non-zero latency personal network drive.

Bug report submitted.

https://savannah.gnu.org/bugs/index.php?49203


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave