[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dir/ls once again
From: |
Henry F. Mollet |
Subject: |
Re: dir/ls once again |
Date: |
Fri, 08 Oct 2004 11:28:15 -0700 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
Is my older version of Octave the problem that x =
char({dir('*.CandO').name}) does not work or am I not doing this correctly?
octave:13> OCTAVE_VERSION
OCTAVE_VERSION = 2.1.46
octave:14> computer
powerpc-apple-darwin6.6
octave:18> cd CandO
octave:19> pwd
/Users/mollet/CandO
octave:20> ls
Cc09_01_copy.jpg imread.m
Easterlingetal2000 koski.m
Cut % CandO directory has lots of files
octave:21> x = char({dir('*.CandO').name})
ls: *.CandO: No such file or directory
error: matrix cannot be indexed with .
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating assignment expression near line 21, column 3
octave:21> cd
octave:22> pwd
/Users/mollet
octave:23> x = char({dir('*.CandO').name})
ls: *.CandO: No such file or directory
error: matrix cannot be indexed with .
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating assignment expression near line 23, column 3
Henry
on 10/8/04 4:46 AM, Paul Kienzle at address@hidden wrote:
> octave:19> x = char({dir('*.cc').name})
> x =
>
> fsolve.cc
> oct-sort.cc
> rand.cc
> sort.cc
>
> octave:20> OCTAVE_VERSION
> OCTAVE_VERSION = 2.1.55
> octave:21> computer
> powerpc-apple-darwin7.2.0
>
> On Oct 8, 2004, at 5:08 AM, Jiri Pachman wrote:
>
>> Hi everyone,
>> I can not find answer concerning string creation using dir/ls command.
>>
>> I want to create string containing output of dir command. I have file
>> with specific suffix and I want to use it later for loading files of
>> the same name.
>>
>> Example:
>> test.inf
>> test_001.dat
>> test_002.dat
>> test_003.dat
>> test_004.dat
>>
>> I would like to use the *.inf to create string with the name test.res
>> and than use part of this string to identify other files for loading.
>> I hoped a = ls *.inf could do it but it does not work. I can create
>> this string manually but I believe there has to be a way.
>>
>> If you could help me out or point me in the direction where I can read
>> something about it I would appreciate it.
>>
>> Thanks
>> Jiri Pachman
>>
>>
>> --
>> ***************************************************
>> Ing. Jiri Pachman
>> Katedra Teorie a Technologie Vybusnin
>> Univerzita Pardubice - FCHT
>> Studentska 95
>> Pardubice 53210
>> tel. +420 46 603 8018
>> ***************************************************
>>
>>
>>
>> -------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.
>>
>> Octave's home on the web: http://www.octave.org
>> How to fund new projects: http://www.octave.org/funding.html
>> Subscription information: http://www.octave.org/archive.html
>> -------------------------------------------------------------
>>
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------