Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Very simple question
Replies: 1   Last Post: Apr 9, 2014 4:46 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steve Gray

Posts: 103
Registered: 7/6/07
Very simple question
Posted: Apr 9, 2014 4:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I've been away from Mathematica for about 7 years.
Can anyone tell me why function fx gives an error message but fy does
not? They look functionally the same to me.
Please send me an email about this.

fx[ptl_] := Module[{x1, y1, x2, y2, x3, y3},
x1 = pt1[[1, 1]]; y1 = pt1[[1, 2]];
x2 = pt2[[2, 1]]; y2 = pt2[[2, 2]];
x3 = pt3[[3, 1]]; y3 = pt3[[3, 2]];
Print[x1, y1, x2, y2, x3, y3];
fx[{{1, 2}, {3, 5}, {4, 7}}]

fy[pt1_] := Module[{zz, x1, y1, x2, y2, x3, y3},
zz = pt1;
x1 = zz[[1, 1]]; y1 = zz[[1, 2]];
x2 = zz[[2, 1]]; y2 = zz[[2, 2]];
x3 = zz[[3, 1]]; y3 = zz[[3, 2]];
Print[x1, y1, x2, y2, x3, y3]
fy[{{1, 2}, {3, 5}, {4, 7}}]

Thank you.
Steve Gray

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.