| 9 | | within PhaseSystems.ThreePhase_dq0; |
| 10 | | redeclare function jj "Vectorized version of j" |
| 11 | | input Real[:,:] xx "array of voltage or current vectors"; |
| 12 | | output Real[size(xx,1),size(xx,2)] yy "array of rotated vectors"; |
| 13 | | algorithm |
| 14 | | yy := cat(1, {-xx[2,:], xx[1,:]}, zeros(size(xx,1)-2, size(xx,2))); |
| 15 | | annotation(Inline=true); |
| 16 | | end jj; |
| | 9 | model InlineMatrixFunction |
| | 10 | function jj "Vectorized version of j" |
| | 11 | input Real[:,:] xx "array of voltage or current vectors"; |
| | 12 | output Real[size(xx,1),size(xx,2)] yy "array of rotated vectors"; |
| | 13 | algorithm |
| | 14 | yy := cat(1, {-xx[2,:], xx[1,:]}, zeros(size(xx,1)-2, size(xx,2))); |
| | 15 | annotation(Inline=true); |
| | 16 | end jj; |
| | 17 | Real[3, 1] v = {{1}, {2}, {3}}; |
| | 18 | Real[3, 1] jv = jj(v); |
| | 19 | end InlineMatrixFunction; |