running a .m file in Octave

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

running a .m file in Octave

Kevin Freund

I’m very new to Octave and I downloaded it because I found a .m file for Matlab and discovered that the open source program Gnu Octave would run such files and is almost the same as Matlab.

 

It is a geodetic function that performs a Helmert 3D transformation using as input 2 cartesian (XYZ) files in different datums to apply a least squares adjustment to produce 7 parameters.

The parameters are 3 x y z shifts, 3 rotations and a scale factor.

 

I can’t get the program to run I don’t understand exactly how to do it.

 

Firstly I thought that just putting the name in the command window would do it, after I amended the first line to add the correct parameters in the brackets.

It kept giving error undefined in line 1 column 1.

I found an explanation that there must be no capital letters anywhere in the function where small letters were used earlier.

 

I can’t remember all the things I have tried but once yesterday it gave an indication that the input file I had named infile1.txt was wrong by putting a small arrow under the “1”.

I have now changed the names to inA.txt and inB.txt.

 

This morning I put the word run before the file, (helmert3d.m) and it came up with error in the SCRIPT at line 58 col 5.

 

I also downloaded from Octave forge, the example package and tried to run the .m file in it. It said somewhere that I had to load the package but I couldn’t achieve that either.

 

I’ll attach the Helmert file and my 2 input files.

 

Any help would be appreciated because there are not many standalone programs to implement this function.

 

Kevin Freund




helmert3d.m (14K) Download Attachment
InA.txt (630 bytes) Download Attachment
inB.txt (630 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: running a .m file in Octave

Doug Stewart-4


On Sun, Apr 8, 2018 at 1:04 AM, Kevin Freund <[hidden email]> wrote:

I’m very new to Octave and I downloaded it because I found a .m file for Matlab and discovered that the open source program Gnu Octave would run such files and is almost the same as Matlab.

 

It is a geodetic function that performs a Helmert 3D transformation using as input 2 cartesian (XYZ) files in different datums to apply a least squares adjustment to produce 7 parameters.

The parameters are 3 x y z shifts, 3 rotations and a scale factor.

 

I can’t get the program to run I don’t understand exactly how to do it.

 

Firstly I thought that just putting the name in the command window would do it, after I amended the first line to add the correct parameters in the brackets.

It kept giving error undefined in line 1 column 1.

I found an explanation that there must be no capital letters anywhere in the function where small letters were used earlier.

 

I can’t remember all the things I have tried but once yesterday it gave an indication that the input file I had named infile1.txt was wrong by putting a small arrow under the “1”.

I have now changed the names to inA.txt and inB.txt.

 

This morning I put the word run before the file, (helmert3d.m) and it came up with error in the SCRIPT at line 58 col 5.

 

I also downloaded from Octave forge, the example package and tried to run the .m file in it. It said somewhere that I had to load the package but I couldn’t achieve that either.

 

I’ll attach the Helmert file and my 2 input files.

 

Any help would be appreciated because there are not many standalone programs to implement this function.

 

Kevin Freund




I anmlooking at it


--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: running a .m file in Octave

Doug Stewart-4


On Sun, Apr 8, 2018 at 10:26 AM, Doug Stewart <[hidden email]> wrote:


On Sun, Apr 8, 2018 at 1:04 AM, Kevin Freund <[hidden email]> wrote:

I’m very new to Octave and I downloaded it because I found a .m file for Matlab and discovered that the open source program Gnu Octave would run such files and is almost the same as Matlab.

 

It is a geodetic function that performs a Helmert 3D transformation using as input 2 cartesian (XYZ) files in different datums to apply a least squares adjustment to produce 7 parameters.

The parameters are 3 x y z shifts, 3 rotations and a scale factor.

 

I can’t get the program to run I don’t understand exactly how to do it.

 

Firstly I thought that just putting the name in the command window would do it, after I amended the first line to add the correct parameters in the brackets.

It kept giving error undefined in line 1 column 1.

I found an explanation that there must be no capital letters anywhere in the function where small letters were used earlier.

 

I can’t remember all the things I have tried but once yesterday it gave an indication that the input file I had named infile1.txt was wrong by putting a small arrow under the “1”.

I have now changed the names to inA.txt and inB.txt.

 

This morning I put the word run before the file, (helmert3d.m) and it came up with error in the SCRIPT at line 58 col 5.

 

I also downloaded from Octave forge, the example package and tried to run the .m file in it. It said somewhere that I had to load the package but I couldn’t achieve that either.

 

I’ll attach the Helmert file and my 2 input files.

 

Any help would be appreciated because there are not many standalone programs to implement this function.

 

Kevin Freund




I anmlooking at it


--
DAS


You have modified  helmert3d.m can you send the original?

--
DAS