Author |
Topic  |
|
kubra
Slovakia
10 Posts |
Posted - 01/26/2017 : 06:25:07 AM
|
Origin Ver. and Service Release (Select Help-->About Origin): 9 (Academic), 64-bit Operating System: win7
Hello
During my calculations I do need to calculate inverse matrices, however, sometimes a pseudoinverse matrix needs to be calculated. When this happens, a pop-up window appears, informing about the fact, that pseudoinverse matrix has to be calculated (X-abort calculation, OK-continue), and the whole calculation is interrupted. I am always OK with this, so is there a way (or C command) to stop this pop up window appearing (like automatic OK response), and just leave code to continue?
Thanks. Branislav |
|
cpyang
USA
1406 Posts |
Posted - 01/26/2017 : 10:10:07 AM
|
Can you put down a few lines of code to show?
CP
|
 |
|
kubra
Slovakia
10 Posts |
Posted - 01/27/2017 : 04:05:22 AM
|
Hopefully this will be enough: //:calculation.// zaklWeight = field * loess; zaklTransp = zaklWeight * tField; BOOL in; in = LT_execute("minverse im:=[MatrixValues]Fields*Transp om:=[MatrixValues]Inverse;"); inverField = inverse * field; weighted = inverField *loess; coef = weighted * signal;
lowercase name is matrix name (Matrix<double> inverse(inverseMl), Matrix<double> zaklTransp(zaklTranspMl)). uppercase name is matrix layer name (int matindex8 = MatrixValuesMp.AddLayer("Inverse"), int matindex7 = MatrixValuesMp.AddLayer("Fields*Transp"))
It works perfectly most of the time, and results seem to be all right. It is only, that sometimes the program stops due to pseudoinverse matrix attention window. I have not noticed problems with values, matrix dimensions. |
 |
|
cpyang
USA
1406 Posts |
Posted - 01/27/2017 : 10:37:02 PM
|
from script window, run
ed.open(minverse)
and then you will see the code in the minverse X-function in code builder. As you can see, it simply call the Inverse() method of the matrix class. So your best bet is not to use this X-Function with LT_execute and use the Origin C code directly.
CP
|
 |
|
kubra
Slovakia
10 Posts |
Posted - 01/30/2017 : 10:14:09 AM
|
Thanks for advice, tried it with zaklWeight = field * loess; zaklTransp = zaklWeight * tField; inverse=zaklTransp.Inverse(); inverField = inverse * field; weighted = inverField *loess; coef = weighted * signal;
The windows did not show up, however, results of calculations were not right (in fact, all are 0). Is my code wrong (as usual) or am I missing something?
|
 |
|
cpyang
USA
1406 Posts |
|
|
Topic  |
|
|
|