| Author |
Comment/Response |
Beth
|
08/30/07 11:27pm
I have plenty of experience working with lists, but this has me stuck. I have a list, pbpts, which is global. This section of code is in a function I've defined:
Print[pbpts];
Delete[pbpts, pt];
Append[pbpts, {x2, y2}];
Print[x2];
Print[y2];
Print[pbpts];
When I call the function, with pt=1, this is the output:
{{-1,0},{0,-1},{Sqrt[3]/2,1/2}}
-0.521516
0.462285
{{-1,0},{0,-1},{Sqrt[3]/2,1/2}}
I don't understand why my list is unchanged?? Why would Delete and Append have no effect?
Does anyone have any ideas?
Thank you!
URL: , |
|