Sponsored Content
Top Forums Shell Programming and Scripting using Octave and bash command together Post 302592715 by Johanni on Tuesday 24th of January 2012 04:02:20 PM
Old 01-24-2012
using Octave and bash command together

Hej all,

I have an script which I run it with Octave command in Linux, I want to know how could I put bash commands like grep and sed and use them together with octave?

My Octave script:

Script.sh:

Code:
m = load ("file", "-ascii")
for i=1:10
    g(i)= sin(m)
end

and then I use this command for running it:

Code:
Octave Script.sh

How could I use bash commands like grep and sed inside the octave script?
 

3 More Discussions You Might Find Interesting

1. Tips and Tutorials

Octave --- My octuple boot laptop

As I promised in several threads, here are some notes on how I installed several Operating Systems on my laptap. I will give links to the tools that I obtained from various third parties. And I will include the source code for a few scripts that I wrote. Introduction A few months ago the disk... (3 Replies)
Discussion started by: Perderabo
3 Replies

2. UNIX and Linux Applications

Where Octave stores it's variables

Hej guys, I'm doing some simple matrix operations with octave and don't know where and how it stores it's variables. Is there any file somewhere that could be accessed? I was using MATLAB before and now Octave is new for me. Or maybe I should use some commands to save and load it. but... (0 Replies)
Discussion started by: Johanni
0 Replies

3. Programming

How to install Octave?

This is probably something really simple, but I don't get it. I downloaded a copy of Octave and extracted it to octave-2.1.73-sol10-sparc-local. Now what do I do with it? I chmod'ed it to 777 and tried running it which just gave me an endless stream of errors. Here's the beginning of the file... (4 Replies)
Discussion started by: Michele31416
4 Replies
OCTAVE(1)						      General Commands Manual							 OCTAVE(1)

NAME
octave - A high-level interactive language for numerical computations. SYNOPSIS
octave [options]... [file] DESCRIPTION
Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solv- ing linear and nonlinear problems numerically. OPTIONS
The complete set of command-line options for octave is available by running the following command from the shell. octave --help DOCUMENTATION
The primary documentation for Octave is written using Texinfo, the GNU documentation system, which allows the same source files to be used to produce on-line and printed versions of the manual. You can read the on-line copy of the Octave documentation by issuing the following command from within octave. octave:1> doc The Info files may also be read with a stand-alone program such as info or xinfo. HTML, Postscript, or PDF versions of the documentation are installed on many systems as well. BUGS
The Octave project maintains a bug tracker at http://bugs.octave.org. Before submitting a new item please read the instructions at http://www.octave.org/bugs.html on how to submit a useful report. FILES
Upon startup Octave looks for four initialization files. Each file may contain any number of valid Octave commands. octave-home/share/octave/site/m/startup/octaverc Site-wide initialization file which changes options for all users. octave-home is the directory where Octave was installed such as /usr/local. octave-home/share/octave/version/m/startup/octaverc Site-wide initialization file for Octave version version. ~/.octaverc User's personal initialization file. .octaverc Project-specific initialization file located in the current directory. AUTHOR
John W. Eaton <jwe@octave.org> GNU Octave 4 February 2011 OCTAVE(1)
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy