Hi, the following function ' ptTransform' is used to transform a 3 D point by a homogeneous transformation matrix. I used compile because it will be called many times. Why do I get this error : CompiledFunction::cfex :
"Could not complete external evaluation at instruction 1;"
ptTransform = Compile[{{pt3D, _Real, 1}, {g, _Real, 2}},
Module[{a, homogeneousPt, transfomredPt},
homogeneousPt = Flatten@{pt3D, 1};
transfomredPt = g.homogeneousPt;
transfomredPt[[1 ;; 3]]
]
];
"Could not complete external evaluation at instruction 1;"
ptTransform = Compile[{{pt3D, _Real, 1}, {g, _Real, 2}},
Module[{a, homogeneousPt, transfomredPt},
homogeneousPt = Flatten@{pt3D, 1};
transfomredPt = g.homogeneousPt;
transfomredPt[[1 ;; 3]]
]
];