Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16759
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newspeer1.nac.net!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail |
|---|---|
| From | Bob Hanlon <hanlonr357@gmail.com> |
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Very simple question |
| Date | Thu, 10 Apr 2014 07:07:32 +0000 (UTC) |
| Sender | steve@smc.vnet.net |
| Approved | Steven M. Christensen <steve@smc.vnet.net>, Moderator |
| Message-ID | <li5fvk$3js$1@smc.vnet.net> (permalink) |
| References | <20140409081426.C0FCB69F2@smc.vnet.net> |
| Lines | 66 |
| Organization | Time-Warner Telecom |
| NNTP-Posting-Date | 10 Apr 2014 07:13:30 GMT |
| NNTP-Posting-Host | faf1d749.news.twtelecom.net |
| X-Trace | DXC=@oC_@nm]9JTaZ\a6[n:\J_C_A=>8kQj6];[h;PUXBgbT`9@n`L<iRV\EFiONJ7[GoViL^oobF=\lT |
| X-Complaints-To | abuse@twtelecom.net |
| Xref | csiph.com comp.soft-sys.math.mathematica:16759 |
Show key headers only | View raw
There is a problem with your entry of the argument to fx. If it is
re-entered, the function works partially. It works only partially because
pt2 and pt3 are undefined. Presumably you meant to use pt1 throughout.
Doing that causes fx and fy to return the same results.
fx[pt1_]:=Module[{x1,y1,x2,y2,x3,y3},
Print[pt1];
x1=pt1[[1,1]];y1=pt1[[1,2]];
x2=pt1[[2,1]];y2=pt1[[2,2]];
x3=pt1[[3,1]];y3=pt1[[3,2]];
Print[x1,y1,x2,y2,x3,y3];]
fx[{{1,2},{3,5},{4,7}}]
{{1,2},{3,5},{4,7}}
123547
fy[pt1_]:=Module[{zz,x1,y1,x2,y2,x3,y3},
zz=pt1;
Print[zz];
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}}]
{{1,2},{3,5},{4,7}}
123547
All of these assignments are unnecessary.
Print@@Flatten@{{1,2},{3,5},{4,7}}
123547
Bob Hanlon
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: Very simple question Bob Hanlon <hanlonr357@gmail.com> - 2014-04-10 07:07 +0000
csiph-web