English
Source / code snippets

sped Eigenmultiplikation of/ one Matrix

 

p.specht

with manchen Tasks, The through Matrizenrechnung resolved go should, is the product R = X' X of/ one Matrix demand. with X' becomes known The Transponierte (= The around the Hauptdiagonale left-supra to right-under gewendete Matrix) marks. with Eigenmultiplikationen can itself these Transposition as well as The Berechnung all downstairs Diagonalelemente the Ergebnismatrix R but save, there with this Operationen always a quadratische, diagonalsymmetrische Matrix herauskommt. the following Programmstück erspart means a crowd semidetached-gemoppel and, particularly with more Matrizen, plenty Rechenzeit.

Info: On quadratic-symmetrische Matrizen can too others Operationen particularly efficient utilize, about The Spiegelungsoperationen the Algorithmus of Alston Scott Householder, the Jacobiverfahren, The Givens-Rotation or The schrittweise Eigenwert-Faktorenermittlung to Von_Mises.

Window Title "Beschleunigte Eigenmultiplikation R=X'X of/ one Matrix X"
Windowstyle 24:Window 0,0-%maxx,%maxy
set("decimals",17):set("numwidth",26)
var n&=4:var m&=3
declare x![n&-1,m&-1],k&,x#
dim x#,8*m&*n&:k&=x#:x#=addr(x![0,0]):float x#,0=\
1,2,1, 2,3,3, 3,2,1, 2,1,1
' 1.1  , 2.2 , 3.33/10^2 ,\
' 4    , 5   , 6.6       ,\
' 7.7E2, 8.88, 9.9999    ,\
'10.0  ,11.11,12.3456
x#=k&:dispose x#
declare i&,j&,s!,R![m&-1,m&-1]

whileloop 0,m&-1:k&=&Loop:s!=0

    Whileloop 0,n&-1

        s!=s!+SQR(x![&Loop,k&])

    endwhile

    R![k&,k&]=s!

endwhile

Whileloop 0,m&-1:k&=&Loop

    Whileloop k&+1,m&-1:j&=&Loop:s!=0

        whileloop 0,n&-1:i&=&Loop

            s!=s!+x![i&,j&]*x![i&,k&]

        endwhile

        R![j&,k&]=s!
        R![k&,j&]=s!

    endwhile

endwhile

'Show

whileloop 0,m&-1:i&=&Loop

    whileloop 0,m&-1:k&=&Loop

        print tab(k&*28);R![i&,k&],
        endwhile:print

    endwhile

    waitinput
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/19/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

771 Views

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie