Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.
  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

1

Monday, October 27th 2003, 8:53pm

Frage zur Übung 1 - bzw Scheme Anwendung

Also kurz die Aufgabe schildern:
Man soll überprüfen ob zwei Vektoren senkrecht zueinander stehen oder nicht, was ja an sich nicht das Problem ist, aber wie kann ich aus der Funktion den Wert auslesen den ich bekomme:

(define(skalar a1 b1 a2 b2 a3 b3) (+(*a1 b1)(*a2 b2)(*a3 b3)))

das ist meine funktion mit der ich das skalar berechne aber wie löse ich das Problem!
(if (= x 0)
0
.....)

Das x steht ja hier für die Lösung, aber wie bekommt das x den Wert aus dem Skalarprodukt! Habe in dem Scheme Buch in den ersten 2 Kapitel nicht wirklich nen Anhalt gefunden!
Danke im Voraus

Shadow

... mit bunten Sternchen und so

  • "Shadow" is male

Posts: 838

Date of registration: Dec 21st 2001

Location: Hamburg

2

Monday, October 27th 2003, 8:58pm

Meinst Du das?

Source code

1
2
3
4
5
(if (= (skalar a1 b1 a2 b2 a3 b3) 0)
 .
 .
 .
)
"Man hält die Erzeugung von Information für ein Zeichen von Intelligenz, während in Wirklichkeit das Gegenteil richtig ist: Die Reduktion, die Auswahl der Information ist die viel höhere Leistung."
-- Heinz Zemanek

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

3

Monday, October 27th 2003, 9:09pm

axo! thanks