transpose error, linear system
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
i am trying to solve a problem of Ax=B, I pass my c++ variables to matlab, and then i want to solve the problem and get it back. I have a nXn matrix and to solve the issue of c++ row base with matlab column base i load the transpose matrix like:
engPutVariable(ep, "Am",Am);
engPutVariable(ep, "Bm",Bm);
engPutVariable(ep, "Rm",Rm);
engEvalString (ep, "Am = transpose(Am);");
engEvalString (ep, "Rm = linsolve(Am,Bm);");
Rm = engGetVariable(ep,"Rm");
When i tried an example of 3x3 it computes correctly the 2 of the 3 values an on the third is garbage. Any ideas? Thanks you all.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur C Shared Library Integration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!