help-octave
[Top][All Lists]
Advanced

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

Re: How to use a script to run a .m function?


From: Markus Bergholz
Subject: Re: How to use a script to run a .m function?
Date: Wed, 8 May 2013 15:35:26 +0200

try in octave something like that (given that all your xxx.jpg are separated in one single folder without other files)

folder='Bilder';
dirListing = dir(folder);
for d = 3:length(dirListing)
        fileName = fullfile(folder,dirListing(d).name);
        main_image(fileName);
                % sprintf('%s',fileName) %% for debugging
 end



On Wed, May 8, 2013 at 3:23 PM, sflee <address@hidden> wrote:
Hi all,

I have a function --- main_image.m
To use this function, I have to input one parameter ---
main_image('001.jpg')

I am using ubuntu 12.04, every time I will run octave in a terminal.

The case is that, I stored all the commands in the form like this in a
xxx.txt file:
main_image('001.jpg')
main_image('002.jpg')
...

I turn on octave in a terminal and input cat xxx.txt
I will have the following errors:
error: invalid conversion from string to real scalar
error: octave_base_value::int_value (): wrong type argument 'sq_string'
error: cat: DIM must be an integer

What can I do?



--
View this message in context: http://octave.1599824.n4.nabble.com/How-to-use-a-script-to-run-a-m-function-tp4652741.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave



--
icq: 167498924
XMPP|Jabber: address@hidden

reply via email to

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