Seite 1 von 1

Matrix*Vektor=Vektor

Verfasst: Mo 27. Feb 2012, 13:16
von polaiwio
Hallo liebes Forum,

ich schreibe zurzeit meine Diplomarbeit und habe ein sehr unschönes Problem. Folgender Code

Code: Alles auswählen

left (
matrix{2(h_0+h_1) # h_1 # 0 # 0 # dotsaxis # 0 ##
		h_1 # 2 (h_1+h_2) # h_2 # 0 # dotsaxis # 0 ##
		0 # h_2 # 2(h_2+h_3) # h_3 # dotsaxis # 0 ##
		dotsvert # dotsvert # dotsvert # dotsvert # dotsdown # dotsvert ##
		0 # dotsaxis # dotsaxis # dotsaxis # h_{n-1} # 2(h_{n-1}+ h_n)}
right ) cdot left (
stack{y_1^{''} # y_2^{''} # y_3^{''} # dotsvert # y_n^{''}}
right ) = left (
stack {6({y_2-y_1}over{h_1}-{y_1-y_0}over{h_0}) # 6({y_3-y_2}over{h_2}-{y_2-y_1}over{h_1}) # 6({y_4-y_3}over{h_3}-{y_3-y_2}over{h_2}) # dotsvert # 6({y_{n+1}-y_n}over{h_n}-{y_n-y_{n-1}}over{h_{n-1}})}
right )
erzeugt ein Gleichungssystem. Leider sind die Zeilen im Ergebnisvektor höher als die im linken Teil, da hier Brüche vorkommen.

Kennt jemand eine Lösung, mit der ich die Zeilen richtig zueinander ausrichten kann? Ich bin für jede Hilfe dankbar.

Re: Matrix*Vektor=Vektor

Verfasst: Mo 27. Feb 2012, 17:04
von gogo
Nicht wirklich schön?

Code: Alles auswählen

    left (
    matrix{2(h_0+h_1) # h_1 # 0 # 0 # dotsaxis # 0 ##
          {} # {} # {}  # {} # {} # {} ##
          h_1 # 2 (h_1+h_2) # h_2 # 0 # dotsaxis # 0 ##
          {} # {} # {}  # {} # {} # {} ##
          0 # h_2 # 2(h_2+h_3) # h_3 # dotsaxis # 0 ##
          {} # {} # {}  # {} # {} # {} ##
          dotsvert # dotsvert # dotsvert # dotsvert # dotsdown # dotsvert ##
          {} # {} # {}  # {} # {} # {} ##
          0 # dotsaxis # dotsaxis # dotsaxis # h_{n-1} # 2(h_{n-1}+ h_n)}
    right )   cdot  left (
    stack{y_1^{''} # {} # y_2^{''} # {} # y_3^{''}  # {} # dotsvert  # {} # y_n^{''}}
    right ) = left (
    stack {6({y_2-y_1}over{h_1}-{y_1-y_0}over{h_0}) # 6({y_3-y_2}over{h_2}-{y_2-y_1}over{h_1}) # 6({y_4-y_3}over{h_3}-{y_3-y_2}over{h_2}) # dotsvert # 6({y_{n+1}-y_n}over{h_n}-{y_n-y_{n-1}}over{h_{n-1}})}
    right )
oder reicht's?