help-octave
[Top][All Lists]
Advanced

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

FINAL: I would like to do this, but is not supported


From: charo
Subject: FINAL: I would like to do this, but is not supported
Date: Fri, 24 Oct 2003 14:53:04 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630

Hi all,

thanks to all replying to my question.

At the end, I used Geraint's advice as his/her comments fitted best my
needs/thoughts.

Therefore, my script no looks as follows:

Using eval as in (1) I can load a bunch of frames in a binary octave
file, and using eval as in (2) I can create a bunch of matrices with
data from the frames in a regular way.

I didn't want to do it manually because that way is really error-prone
and time consuming.

I really appreciate how people try to help each other and I hope to
contribute to this great software soon. Cooperative programming is
amazingly the best way to work.

Rosario


..........................................................................
#! /usr/local/bin/octave -q

#sript name extractSG:
#      RBC 2003

#echo on all;

numFrames=100000;
if nargin != 2
   Usage= "extractSG fileFrames outputFile",
   return;
endif
eval(sprintf("load %s;",argv{[1,1]})); <-------------- (1)
for i=1:numFrames
  fr = eval(sprintf("seq%03i",i));
  scFr = getSignedSpatialContrast(fr);
  eval(sprintf("sg_seq%03i = scFr;",i)); <------------ (2)
  if mod(i,31)==0
     eval(sprintf("save -b %s sg_seq*;",argv{[2,1]}));
  endif
  eval(sprintf("clear seq%03i",i));
endfor
eval(sprintf("save -b %s sg_seq*;",argv{[2,1]}));
.............................................................



address@hidden wrote:
On 23 Oct 2003 at 14:19, Geraint Paul Bevan wrote:


charo wrote:


|>        eval(sprintf("tempGrad(%03i,%03i)",i,j))= tcFr; <---- (2)

This should work if you put the "= tcFr" inside the string to be evaluated

[*untested*]
eval(sprintf("tempGrad(%03i,%03i) = tcFr",i,j));


Why not assign it directly:  tempGrad(i,j) = tcFr;

Paul Kienzle
address@hidden



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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