Changes between Initial Version and Version 1 of Ticket #4055, comment 2


Ignore:
Timestamp:
2016-09-26T07:47:22Z (9 years ago)
Author:
massimo ceraolo

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4055, comment 2

    initial v1  
    1 It seems a problem related to the use of complex numbers in algorithms.
    2 If I the algorithm section with an equation section doing the same things the model compiles and runs.
     1At least there is a problem related to the use of complex numbers in algorithms.
     2the following code works:
     3
     4
     5{{{
     6model ComplexFillEqs
     7  parameter Integer n = 3;
     8  Complex Z[n];
     9  constant Complex z0 = Complex(1.0, 1.0);
     10equation
     11  Z=fill(z0,n);
     12end ComplexFillEqs;
     13}}}
     14
     15the following does not:
     16
     17
     18{{{
     19model ComplexFill
     20  parameter Integer n = 3;
     21  Complex Z[n];
     22  constant Complex z0 = Complex(1.0, 1.0);
     23algorithm
     24  Z := fill(z0,n);
     25end ComplexFill;
     26
     27}}}
     28
     29
    330Unfortunately I need to manipulate complex matrices inside functions, and therefore I need algorithm sections.
    431Other people might have the same need.