transpose error, linear system

3 ビュー (過去 30 日間)
Pavlos
Pavlos 2013 年 8 月 2 日
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 件)

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by