﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1283	Assigning matrices is terribly inefficient (unneeded expand)	asodja	Per Östlund	"The following model calles function `EulerAngles` with same arguments for every element of the matrix:
{{{#!mo
model TransformMatrix
  function EulerAngles 
    ""Computes transformation matrix for given Euler angles""
    input Real phi;
    input Real theta;
    input Real psi;
    output Real A[4, 4];
  algorithm 
    A := diagonal(vector(ones(1, 4)));
    A[1, 1] := cos(psi)*cos(phi) - cos(theta)*sin(phi)*sin(psi);
    A[1, 2] := cos(psi)*sin(phi) + cos(theta)*cos(phi)*sin(psi);
    A[1, 3] := sin(psi)*sin(theta);
    A[2, 1] := -sin(psi)*cos(phi) - cos(theta)*sin(phi)*cos(psi);
    A[2, 2] := -sin(psi)*sin(phi) + cos(theta)*cos(phi)*cos(psi);
    A[2, 3] := cos(psi)*sin(theta);
    A[3, 1] := sin(theta)*sin(phi);
    A[3, 2] := -sin(theta)*cos(phi);
    A[3, 3] := cos(theta);
  end EulerAngles;
  
  parameter Real phi = 0;
  parameter Real theta = 0;
  parameter Real psi = 0;
  parameter Real T[4, 4]=EulerAngles(phi,theta,psi);  
end TransformMatrix;
}}}"	defect	closed	blocker	1.14.0	New Instantiation	trunk	fixed		asodja
