|
From: | Ozzy Lash |
Subject: | Re: pasting data |
Date: | Tue, 20 Mar 2018 21:02:25 -0500 |
I often use octave for quick calculations. For instance, I had some voltage/current data for a sensor, and wanted to see a plot and fit a trendline (first and second order polynomials). I started by putting the data in a spreadsheet, but then I wanted to calculate some derived quantities and realized that easier to work with the data in Octave.
The simplest and quickest way to cut data into Octave's commandline is to just assign it into an array: type 'a=[', then paste the table of data, and follow by a ']'. This works for most contexts, except when the column separator is a tab, as is the case when you're copying from a spreadsheet. I think tabs trigger readline's completion mechanism and at best do nothing and at worst could corrupt pasted data.
The tabs are even a problem when constructing a string while trying to use strread().
I know that I could save the data into a file outside of octave ("cat > /tmp/data", paste data and type Ctrl-D) and textread() it, but that's too much work :)
Is there a way to temporarily disable readline's TAB functionality, or bypass it in some clever way?
[Prev in Thread] | Current Thread | [Next in Thread] |