Reading in a data file into Octave

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

Reading in a data file into Octave

Alex Yelland
Hello,

My name is Alexander Yelland, and I am very new to using Octave (and to this type of programming/code writing in general). I am currently working with one of my professors in regards to some physics research we are attempting to conduct. 

For the next stage of my research, my professor has request of me to learn how to "read in" a data file such as in a text or excel format. I have been looking through a couple of sources in the Octave User Manual; however, I am not understanding what I am reading. I was curious if you could shed some light on a simple way to do this within the Octave program?

(In addition to this, if you know a way to easily convert a program written in IDL to a script written in the Octave language, I would also really appreciate any insight...)

Thank you for any help you can provide.


Alexander Yelland

Washburn University


[hidden email]

1 (785) 207-7783



Reply | Threaded
Open this post in threaded view
|

RE: Reading in a data file into Octave

Danielo

Hey  a few months ago, I found this YouTube channel that has something like an Octave crash curse in thirty  something videos.

Anyhow, this one talks about what you want to know, I think this one (the video 17) and the following 3 videos cover what you need, but first, look at number 7 too.

https://youtu.be/gkVOSxmhtyk

 

Daniel Zepeda-Rivas

PhD Candidate

Escola Técnica Superior de Arquitectura

Universidade A Coruña

 


From: Help-octave <help-octave-bounces+daniel.zepeda=[hidden email]> on behalf of Alex Yelland <[hidden email]>
Sent: Wednesday, August 14, 2019 5:45:07 PM
To: [hidden email] <[hidden email]>
Subject: Reading in a data file into Octave
 
Hello,

My name is Alexander Yelland, and I am very new to using Octave (and to this type of programming/code writing in general). I am currently working with one of my professors in regards to some physics research we are attempting to conduct. 

For the next stage of my research, my professor has request of me to learn how to "read in" a data file such as in a text or excel format. I have been looking through a couple of sources in the Octave User Manual; however, I am not understanding what I am reading. I was curious if you could shed some light on a simple way to do this within the Octave program?

(In addition to this, if you know a way to easily convert a program written in IDL to a script written in the Octave language, I would also really appreciate any insight...)

Thank you for any help you can provide.


Alexander Yelland

Washburn University


[hidden email]

1 (785) 207-7783



Reply | Threaded
Open this post in threaded view
|

Re: Reading in a data file into Octave

siko1056
On 8/15/19 4:05 AM, Daniel Zepeda Rivas wrote:

>> *From:* Alex Yelland <[hidden email]>
>>  
>> [...]
>>
>> For the next stage of my research, my professor has request of me to
>> learn how to "read in" a data file such as in a text or excel format. I
>> have been looking through a couple of sources in the Octave User Manual;
>> however, I am not understanding what I am reading. I was curious if you
>> could shed some light on a simple way to do this within the Octave program?
>>
>> (In addition to this, if you know a way to easily convert a program
>> written in IDL to a script written in the Octave language, I would also
>> really appreciate any insight...)
>>
>> Thank you for any help you can provide.
>>
>>
>> Alexander Yelland
>
> [...]
>
> Anyhow, this one talks about what you want to know, I think this one
> (the video 17) and the following 3 videos cover what you need, but
> first, look at number 7 too.
>
> https://youtu.be/gkVOSxmhtyk
>
>
> *Daniel Zepeda-Rivas*
>


Please answer by bottom-posting [1] to this mailing list to make it
easier to follow the conversation.

Those videos are rather old, created 2011.  I did not watch them in
detail, but I think there have been some improvements of how doing
things easier today (e.g. we have a GUI ;-) ).  Anyways, they might
serve as a good start as many commands did not change.

@Alexander Yelland: Regarding the Excel input, I think you should
familiarize with the Octave Forge IO package [2], especially the
`xlsread` function [3].  A very verbose explanation how to make it work
is given in the wiki [4].

Regarding the IDL scripts, do you mean [5]?  Three letter acronyms are
not unique in computer science ;-)  Please be precise.   At least I
don't know a tool to convert [5] to Octave scripts easily.  But it is
said that the syntax does not differ that much.

HTH,
Kai

[1] https://en.wikipedia.org/wiki/Posting_style#Bottom-posting
[2] https://octave.sourceforge.io/io/index.html
[3] https://octave.sourceforge.io/io/function/xlsread.html
[4] https://wiki.octave.org/IO_package
[5] https://en.wikipedia.org/wiki/IDL_(programming_language)