If I have a file c:/eal/tmp/junk.txt
that contains an expression, for example:

  {1, 2, 3}

(an array of integers), then I can use that expression
in any parameter that will accept an array of integers
by giving as the parameter value the following expression:

eval(readFile("c:/eal/tmp/junk.txt"))

Edward


At 12:55 PM 12/2/2005 +0100, Francesc Moll Echeto wrote:
Thank you very much for all the comments and hints.

I found out that, alternatively to defining a waveform with
ContinuousClock (thanks for the hint), it is possible to do the same, in
a more complex way, by concatenating the following elements:

ContinuousSineWave-ZeroCrossingDetector-Timer-Sequence-ZeroOrderHold

Maybe there is a more clever way, but this method has the advantage wrt
ContinuousClock that it is easier to define the waveform, provided all
the points are equally spaced (you only need to define the values, not
the time). Now I have a question:

Is it possible to read the sequence from an external file? I tried to use LineReader, but I don't know how to convert a string to a double so that ZeroOrderHold can generate the waveform.

Thanks,

Francesc
--
------------------------------------------------------------------------
o o o  Francesc Moll Echeto           | High Performance IC Design Group
o o o  Dpt. Electronic Engineering    | www: http://pmos.upc.es/blues
o o o  Univ. Politecnica de Catalunya | email: [EMAIL PROTECTED]
U P C  c/ Gran Capita s/n Ed. C4      | Tel: +34 934016846
       08034 Barcelona, Spain         | Fax: +34 934016756
------------------------------------------------------------------------


----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to