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
MWRAP(1)							   MWRAP manpage							  MWRAP(1)

NAME
mwrap - Octave/MATLAB mex generator SYNOPSIS
mwrap [-mex outputmex] [-m output.m] [-c outputmex.c] [-mb] [-list] [-catch] [-c99complex] [-cppcomplex] infile1 infile2 ... DESCRIPTION
mwrap is an interface generation system in the spirit of SWIG or matwrap. From a set of augmented Octave/MATLAB script files, mwrap will generate a MEX gateway to desired C/C++ function calls and .m function files to access that gateway. The details of converting to and from Octave's or MATLAB's data structures, and of allocating and freeing temporary storage, are hidden from the user. OPTIONS
-mex specifies the name of the MEX function that the generated functions will call. This name will generally be the same as the prefix for the C/C++ output file name. -m specifies the name of the Octave/MATLAB script to be generated. -c specifies the name of the C MEX file to be generated. The MEX file may contain stubs corresponding to several different generated files. -mb redirect Octave/MATLAB function output to files named in the input. In this mode, the processor will change Octave/MATLAB function output files whenever it encounters a line beginning with @. If @ occurs alone on a line, the output will be turned off; if the line begins with @function, the line will be treated as the first line of a function, and the m-file name will be deduced from the function name; and otherwise, the characters after @ (up to the next set of white space) will be treated as a filename, and mwrap will try to write to that file. -list print to the standard output the names of all files that would be generated from redirect output by the -mb flag. -catch surround library calls in try/catch blocks in order to intercept C++ exceptions. -c99complex use the C99 complex floating point types as the default dcomplex and fcomplex types. -cppcomplex use the C++ complex floating point types as the default dcomplex and fcomplex types. mwrap 2012 MWRAP(1)
All times are GMT -4. The time now is 01:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy