Changeset 703 for branches


Ignore:
Timestamp:
Jan 21, 2009, 3:23:15 PM (14 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Array sample improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/sample/miscellaneous/sample_arrays2.mso

    r574 r703  
    3030        EQUATIONS
    3131
    32         diff(Var1(1,1))*'s' = Var2(1,2);
    33        
    34         for i in [2 : Dimension-1] do
    35                 diff(Var1(1,i))*'s' = Var2(1,i-1)+Var2(1,i+1);
     32        diff(Var1)*'s' = Var2;
     33
     34        for i in [1 : Dimension] do
     35                for j in [1 : Dimension] do
     36                        exp(Scalar)*Var2(i, j) = j*sin(i*time*'rad/s');
     37                end
    3638        end
    37 
    38         diff(Var1(1,Dimension))*'s' = Var2(1,Dimension);
    39         diff(Var1(2:Dimension,:))*'s' = Scalar*Var2(2:Dimension,:);
    40 
    41         exp(Scalar)*Var2 = sin(time*'rad/s');
    4239end
    4340
Note: See TracChangeset for help on using the changeset viewer.