New function not callable - how to refresh?

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

New function not callable - how to refresh?

Borge Strand-Bergesen
After starting Octave 3.2.4 on Win7 I create a new .m file in the
working directory, where I went with cd. The new .m file is not
callable after creation, but if I restart Octave, things work like
expected. I have tried using clear on the function name without any
success.

Is there a simple method of refreshing the list of available functions
/ .m files without restarting?

Thanks,
Borge
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: New function not callable - how to refresh?

dastew
What is the path to your working directory?

> From: [hidden email]
> Date: Sat, 28 Aug 2010 11:24:30 +0200
> Subject: New function not callable - how to refresh?
> To: [hidden email]
>
> After starting Octave 3.2.4 on Win7 I create a new .m file in the
> working directory, where I went with cd. The new .m file is not
> callable after creation, but if I restart Octave, things work like
> expected. I have tried using clear on the function name without any
> success.
>
> Is there a simple method of refreshing the list of available functions
> / .m files without restarting?
>
> Thanks,
> Borge
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: New function not callable - how to refresh?

CdeMills
In reply to this post by Borge Strand-Bergesen
Børge Strand-Bergesen wrote
After starting Octave 3.2.4 on Win7 I create a new .m file in the
working directory, where I went with cd. The new .m file is not
callable after creation, but if I restart Octave, things work like
expected. I have tried using clear on the function name without any
success.

Is there a simple method of refreshing the list of available functions
/ .m files without restarting?
help rehash

Regards

Pascal
Reply | Threaded
Open this post in threaded view
|

Re: New function not callable - how to refresh?

jacques.beilin
In reply to this post by Borge Strand-Bergesen
I have the same behaviour on winXp. Once I strart Octave, I can run a
couple of scripts (after changing the path). Afteward, I cannot run any
other script. It works again as soon as I restart Octave.

Best regards,

Jacques

Le 28/08/2010 11:24, Børge Strand-Bergesen a écrit :

> After starting Octave 3.2.4 on Win7 I create a new .m file in the
> working directory, where I went with cd. The new .m file is not
> callable after creation, but if I restart Octave, things work like
> expected. I have tried using clear on the function name without any
> success.
>
> Is there a simple method of refreshing the list of available functions
> / .m files without restarting?
>
> Thanks,
> Borge
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>    

--
___________________________________________

Beilin Jacques

Institut Géographique National
Ecole Nationale des Sciences Géographiques
Département Positionnement Terrestre et Spatial

Cité Descartes
6,8 avenue Blaise Pascal - Champs Sur Marne
77455 Marne La Vallée Cedex

tel : 01 64 15 31 09 - 06 08 46 68 80

http://www.ensg.ign.fr/Positionnement-Terrestre-et-Spatial-geodesie


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: New function not callable - how to refresh?

John W. Eaton
Administrator
On 30-Aug-2010, jacques.beilin wrote:

| I have the same behaviour on winXp. Once I strart Octave, I can run a
| couple of scripts (after changing the path). Afteward, I cannot run any
| other script. It works again as soon as I restart Octave.

What do you mean that you "cannot run any other script"?  Does running
a script that worked previously generate errors, or is the script not
executed at all?

As a wild guess about something that could cause strange behavior, do
you have the oct2mat package installed?  If so, unload it as described
here:

  http://wiki.octave.org/wiki.pl?OctaveForWindows

If that was the problem, please let us know.

jwe



_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: New function not callable - how to refresh?

jacques.beilin
I made two installations on 2 computers , one with oct2mat and the second without. On the first one I had  to apply the command described in the wiki ( pkg rebuild -noauto oct2mat). After running this command, the plot function could run correctly.

Here is a capture of the terminal (form QtOctave but I had the same behaviour with Octave) :

Starting Octave...
GNU Octave, version 3.2.4

Copyright (C) 2009 John W. Eaton and others.

This is free software; see the source code for copying conditions.

There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or

FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.

Octave was configured for "i686-pc-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.

For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <[hidden email]> (but first, please read

http://www.octave.org/bugs.html to learn how to write a helpful report).

For information about changes from previous versions, type `news'.

warning: mark_as_command is obsolete and will be removed from a future version

of Octave

>>> test_codeCA

warning: implicit conversion from matrix to string

>>> cd "E:/Octave/gnss/CA_code"

>>> cd "E:/Octave/gnss"

>>> cd "E:/Octave/gnss/GPS_a_la_main"

>>> cd "E:/Octave/gnss/GPS_a_la_main/GPSPTISO"

>>> cd "E:/Octave/gnss/GPS_a_la_main/GPSPTISO/gps_a_la_main_20100218"

>>> dir

. donnees_GPS_a_la_main.txt

.. gps_ptiso_52.m

Calc_relat_corr.m gps_ptiso_52.m~

GPS_a_la_main.pdf klobuchar.m

Iono_bifrequence.m message_nav.m

PosSatGPS.m rot.m

Position_approx.m test_trilat.m

Position_approx.m~ trilat.m

cartgeo.m trilat.m~

cartgeo_WGS84.m

>>> gps_ptiso_52

>>>error: `gps_ptiso_52' undefined near line 19 column 1



The first script (test_codeCA) ran correctly but afterward I could not run gps_ptiso_52 (which works normally).

I do not have the same behavior with Octave 3.0 under windows nor with Octave 3.2.4 under Linux.

Best regards,

Jacques Beilin

Le 30/08/2010 18:57, John W. Eaton a écrit :
On 30-Aug-2010, jacques.beilin wrote:

| I have the same behaviour on winXp. Once I strart Octave, I can run a 
| couple of scripts (after changing the path). Afteward, I cannot run any 
| other script. It works again as soon as I restart Octave.

What do you mean that you "cannot run any other script"?  Does running
a script that worked previously generate errors, or is the script not
executed at all?

As a wild guess about something that could cause strange behavior, do
you have the oct2mat package installed?  If so, unload it as described
here:

  http://wiki.octave.org/wiki.pl?OctaveForWindows

If that was the problem, please let us know.

jwe




  

-- 
___________________________________________

Beilin Jacques

Institut Géographique National
Ecole Nationale des Sciences Géographiques
Département Positionnement Terrestre et Spatial

Cité Descartes
6,8 avenue Blaise Pascal - Champs Sur Marne
77455 Marne La Vallée Cedex

tel : 01 64 15 31 09 - 06 08 46 68 80

http://www.ensg.ign.fr/Positionnement-Terrestre-et-Spatial-geodesie


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: New function not callable - how to refresh?

John W. Eaton
Administrator
On 31-Aug-2010, jacques.beilin wrote:

| I made two installations on 2 computers , one with oct2mat and the second
| without. On the first one I had  to apply the command described in the wiki (
| pkg rebuild -noauto oct2mat). After running this command, the plot function
| could run correctly.

OK.  When you are using Octave, you should not have the functions from
the oct2mat package that override functions already provided by Octave.

| Here is a capture of the terminal (form QtOctave but I had the same behaviour
| with Octave) :
|
| Starting Octave...
| GNU Octave, version 3.2.4
|
| Copyright (C) 2009 John W. Eaton and others.
|
| This is free software; see the source code for copying conditions.
|
| There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
|
| FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
|
| Octave was configured for "i686-pc-mingw32".
|
| Additional information about Octave is available at http://www.octave.org.
|
| Please contribute if you find this software useful.
|
| For more information, visit http://www.octave.org/help-wanted.html
|
| Report bugs to <[hidden email]> (but first, please read
|
| http://www.octave.org/bugs.html to learn how to write a helpful report).
|
| For information about changes from previous versions, type `news'.
|
| warning: mark_as_command is obsolete and will be removed from a future version
|
| of Octave
|
| >>> test_codeCA
|
| warning: implicit conversion from matrix to string
|
| >>> cd "E:/Octave/gnss/CA_code"
|
| >>> cd "E:/Octave/gnss"
|
| >>> cd "E:/Octave/gnss/GPS_a_la_main"
|
| >>> cd "E:/Octave/gnss/GPS_a_la_main/GPSPTISO"
|
| >>> cd "E:/Octave/gnss/GPS_a_la_main/GPSPTISO/gps_a_la_main_20100218"
|
| >>> dir
|
| . donnees_GPS_a_la_main.txt
|
| .. gps_ptiso_52.m
|
| Calc_relat_corr.m gps_ptiso_52.m~
|
| GPS_a_la_main.pdf klobuchar.m
|
| Iono_bifrequence.m message_nav.m
|
| PosSatGPS.m rot.m
|
| Position_approx.m test_trilat.m
|
| Position_approx.m~ trilat.m
|
| cartgeo.m trilat.m~
|
| cartgeo_WGS84.m
|
| >>> gps_ptiso_52
|
| >>>error: `gps_ptiso_52' undefined near line 19 column 1
|
| The first script (test_codeCA) ran correctly but afterward I could not run
| gps_ptiso_52 (which works normally).
|
| I do not have the same behavior with Octave 3.0 under windows nor with Octave
| 3.2.4 under Linux.

Are the above results without oct2mat loaded or installed?

What is in the gps_ptiso_52 file?

Does it work if you do

  source ("gps_ptiso_52.m")

?

jwe
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: New function not callable - how to refresh?

jacques.beilin
It seems to be ok when I use the "source" command (tested on linux).

>>> cd "/home/beilin/progs/Octave/geodesie_physique/td_altitudes2/corrige"

>>> exercice_alti

error: `exercice_alti' undefined near line 31 column 1

>>> dir

. .. exercice_alti.m

>>> source ("exercice_alti.m")

1. Calculer les cotes geopotentielles de A1 et B1 en SI et en UGP.

g_C = 9.83064300 m.s-2

cote geopotentielle en C

C_C = 4915.707 m2.s-2

C_C = 491.571 UGP

C_D = 4915.707 m2.s-2

C_D = 491.571 UGP

2. Calculer la distance BD.

C_D-C_B=0.5*(g_B+g_D)*DN

or g_D=g_B + dgdH * DN

d'ou C_D-C_B = 0.5 * (g_B + g_B + dgdH * DN) * DN

dgdH * DN^2 + 2*g_B * DN - 2 * (C_D-C_B)= 0

discriminant :

delta = 95.624

Racines :

x1 = 6.3380e+06

x2 = 502.65

Dn_BD = 502.652 m

>>> exercice_alti

error: `exercice_alti' undefined near line 36 column 1

>>> source ("exercice_alti.m")

1. Calculer les cotes geopotentielles de A1 et B1 en SI et en UGP.

g_C = 9.83064300 m.s-2

cote geopotentielle en C

C_C = 4915.707 m2.s-2

C_C = 491.571 UGP

C_D = 4915.707 m2.s-2

C_D = 491.571 UGP

2. Calculer la distance BD.

C_D-C_B=0.5*(g_B+g_D)*DN

or g_D=g_B + dgdH * DN

d'ou C_D-C_B = 0.5 * (g_B + g_B + dgdH * DN) * DN

dgdH * DN^2 + 2*g_B * DN - 2 * (C_D-C_B)= 0

discriminant :

delta = 95.624

Racines :

x1 = 6.3380e+06

x2 = 502.65

Dn_BD = 502.652 m

>>>



Le 31/08/2010 17:35, John W. Eaton a écrit :
On 31-Aug-2010, jacques.beilin wrote:

| I made two installations on 2 computers , one with oct2mat and the second
| without. On the first one I had  to apply the command described in the wiki (
| pkg rebuild -noauto oct2mat). After running this command, the plot function
| could run correctly.

OK.  When you are using Octave, you should not have the functions from
the oct2mat package that override functions already provided by Octave.


Are the above results without oct2mat loaded or installed?

What is in the gps_ptiso_52 file?
  

It is the script which calls several functions in order the estimate point coordinates from GPS C/A code observations.

Does it work if you do

  source ("gps_ptiso_52.m")

?

jwe

  

Jacques


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave