The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 pseudoinverse matrix

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000