help-octave
[Top][All Lists]
Advanced

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

Re: input variables form the shell


From: Martin Helm
Subject: Re: input variables form the shell
Date: Thu, 01 Mar 2012 18:03:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

Am 01.03.2012 17:51, schrieb jacopo rocchi:
> yes but in the octave script shouldn't I use some kind of argv function to
> save the value 2.0 I give in input in the variable ARG?
> thanks
>
I am really not sure if I understand what you really want

creating a script octarg.m with

args = argv;
disp (2*str2num(args{1}))

inside and then running
octave -qf octarg.m 123

gives 246 as output (or make it executable to have an easier syntax for
calling the script).



reply via email to

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