[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pasting data

From: Przemek Klosowski
Subject: pasting data
Date: Tue, 20 Mar 2018 14:00:16 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]