T O P I C R E V I E W |
kubra |
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 |
5 L A T E S T R E P L I E S (Newest First) |
cpyang |
Posted - 01/30/2017 : 11:08:08 AM Without seeing your code, hard to know what was wrong,
did you look up these examples and see if they are usful?
http://www.originlab.com/doc/OriginC/ref/matrixbase-Inverse
CP
|
kubra |
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 |
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 |
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 |
Posted - 01/26/2017 : 10:10:07 AM Can you put down a few lines of code to show?
CP
|
|
|