"We are back" « oc.at

linearinterpolation

LeadToDeath 23.11.2003 - 12:40 474 2
Posts

LTD

frecher fratz
Avatar
Registered: Feb 2001
Location: is where it is
Posts: 6334
morgen leutelz!

i hätt ne frage und zwar: i hab x1, y1, x2, y2, x3 ABER ich suche y3

hat wer ne ahnung wie ich das lösen könnt?: x1:xy1=x2:y2=x3:y3 ... tjo wie komm i aufs y2? (bin leida in mathe a versager). x und y sind normale zahlen wobei x1:y1<=x2:y2<=x3:y3

sollte so wie ein diagramm aussehen
y3 y2 y1
|
| |
| | |
| | |
----------
x3 x2 x1

die länge vo da stützstelle x2 (y2) is halt gesucht, x2 weiß i ja...
greetz
Bearbeitet von LTD am 23.11.2003, 12:43

Ringding

Pilot
Avatar
Registered: Jan 2002
Location: Perchtoldsdorf/W..
Posts: 4300
Deine Angabe ist irgendwie widersprüchlich. Einmal schreibst du von y3, einmal von y2. Ich glaub du meinst sowas:

y2 = (y3*(x2-x1) - y1*(x2-x3))/(x3-x1)

atrox

in fairy dust... I trust!
Avatar
Registered: Sep 2002
Location: HTTP/1.1 404
Posts: 2782
wenn ich das richtig verstanden habe, ist deine lösung:
y2= y1+( ((x2-x1)/(x3-x1)) * (y3-y1) )

//edit: owned by ringding - kommt aber imho das selbe heraus.
Bearbeitet von atrox am 23.11.2003, 13:06
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz