FlexPro
HistoryBase
Ingénierie
Formation
Téléchargements
Assistance FlexPro
Connaissance
Communauté
À propos de nous
Références
Emplois
Contact général
Liste des revendeurs
Assistance FlexPro
FR
DE
EN
Porte-plaquette
Produits et solutions
Support et téléchargements
Entreprise
Magazine
Contact
Langue
MyWeisang

Paramètres du compte.

Topic

create N times a 3×3 matrix in a formula

Page d'accueil ' Communauté ' Généralités ' create N times a 3×3 matrix in a formula

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Auteur
    Messages
  • #33692
    Norbert Bakkers
    Participant

    When anaysing data I need to create a 3×3 matrix for every timestep (N) (every timestep has it’s own unique 3×3 matrix)

    The matrix should have the following form
    Matrix = [1 to 3, 1 to 3, 1 to N]

    So for N=1 I have
    [A11_1 A12_1 A13_1
    A21_1 A22_1 A23_1
    A31_1 A32_1 A33_1]

    For N=2 the matrix contains:
    [A11_2 A12_2 A13_2
    A21_2 A22_2 A23_2
    A31_2 A32_2 A33_2]

    This function would be similar to the matlab function [i]Matrix(1:3,1:3,1:N)=0[/i]

    #33694
    Norbert Bakkers
    Participant

    When anaysing data I need to create a 3×3 matrix for every timestep (N) (every timestep has it’s own unique 3×3 matrix)

    The matrix should have the following form
    Matrix = [1 to 3, 1 to 3, 1 to N]

    So for N=1 I have
    [A11_1 A12_1 A13_1
    A21_1 A22_1 A23_1
    A31_1 A32_1 A33_1]

    For N=2 the matrix contains:
    [A11_2 A12_2 A13_2
    A21_2 A22_2 A23_2
    A31_2 A32_2 A33_2]

    This function would be similar to the matlab function [i]Matrix(1:3,1:3,1:N)=0[/i]

    #33693
    Bernhard Kantz
    Participant

    You could solve this problem with two formulas. The first formula is a user-defined FPScript function and the second formula returns a list. Please see more details in the FlexPro help.

    Formula Matrix:
    [code]
    Arguments n
    {(3,1,1), (3,1,1), (3,1,(n-1)/2.)}
    [/code]

    Formula ListResult
    [code]
    Dim timestamp = {3,6,9}
    Dim result
    For Each Row i In timestamp Do
    result := [timestamp[i], Matrix(Timestamp[i])]
    End
    result
    [/code]

    support@weisang.com

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Vous devez être connecté pour répondre à ce sujet.