Advertisement
Guest User

eg2

a guest
Feb 25th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. (* Content-type: application/vnd.wolfram.mathematica *)
  2.  
  3. (*** Wolfram Notebook File ***)
  4. (* http://www.wolfram.com/nb *)
  5.  
  6. (* CreatedBy='Mathematica 8.0' *)
  7.  
  8. (*CacheID: 234*)
  9. (* Internal cache information:
  10. NotebookFileLineBreakTest
  11. NotebookFileLineBreakTest
  12. NotebookDataPosition[ 157, 7]
  13. NotebookDataLength[ 3070, 82]
  14. NotebookOptionsPosition[ 2747, 65]
  15. NotebookOutlinePosition[ 3101, 81]
  16. CellTagsIndexPosition[ 3058, 78]
  17. WindowFrame->Normal*)
  18.  
  19. (* Beginning of Notebook Content *)
  20. Notebook[{
  21.  
  22. Cell[CellGroupData[{
  23. Cell["functions", "Section",
  24. CellChangeTimes->{{3.525542878650548*^9, 3.525542880416729*^9}}],
  25.  
  26. Cell["\<\
  27.  
  28.  
  29. Clear[getpos];
  30. getpos[element_String] :=
  31. Module[{goodpos, val, k = Position[vars, element][[1,1]]},
  32. good = Flatten[Position[data, _?((Abs[#[[k]]] > 10^-4)&), {1}]];
  33. Array[(val = data[[good[[#]],k]]; If[val < 0, data[[good[[#]],k]] = \
  34. -val/2])&, Length[good] ];
  35. {k, good}]
  36.  
  37. (* goodpos from 'data' *)
  38.  
  39. \
  40. \>", "Input",
  41. CellChangeTimes->{{3.536807353579389*^9, 3.536807366004743*^9}, {
  42. 3.5368075257040854`*^9, 3.5368075365711107`*^9}, {3.5368075905904207`*^9,
  43. 3.536807603851081*^9}, {3.5368076695852537`*^9, 3.536807670155402*^9}, {
  44. 3.5368077084972143`*^9, 3.5368077264154882`*^9}, 3.5368078060379066`*^9, {
  45. 3.53680785859536*^9, 3.536807868419298*^9}, {3.5368081049732656`*^9,
  46. 3.536808244619398*^9}, {3.5368082756393957`*^9, 3.536808434603407*^9}, {
  47. 3.536808473526009*^9, 3.536808476628237*^9}, {3.536808538685506*^9,
  48. 3.536808542483759*^9}, {3.536808906243566*^9, 3.536808962619392*^9}, {
  49. 3.5368099502054367`*^9, 3.536810010486621*^9}, 3.536810159050418*^9, {
  50. 3.536810189133416*^9, 3.536810484355564*^9}, {3.5368108056318913`*^9,
  51. 3.536810815483436*^9}, {3.5368108563894672`*^9, 3.536810887541497*^9}, {
  52. 3.536810938937948*^9, 3.536811007746114*^9}, 3.5368120422730513`*^9, {
  53. 3.536816734635078*^9, 3.536816764495511*^9}, {3.536817205022016*^9,
  54. 3.5368172718624496`*^9}, {3.53681758429191*^9, 3.5368175845152807`*^9}, {
  55. 3.551205323937608*^9, 3.5512053516434*^9}, {3.552789865373589*^9,
  56. 3.552789884220105*^9}, {3.552859591216968*^9, 3.552859601409501*^9}, {
  57. 3.552859666075337*^9, 3.552859688200486*^9}, {3.552865291934667*^9,
  58. 3.5528652998012*^9}, {3.552865368420989*^9, 3.552865376361524*^9}, {
  59. 3.552865408982329*^9, 3.5528654116231833`*^9}, {3.552865446054214*^9,
  60. 3.552865457377349*^9}, {3.5528655097334137`*^9, 3.552865522895688*^9}, {
  61. 3.552865694133601*^9, 3.552865809620863*^9}, 3.5707790512968493`*^9, {
  62. 3.570781056632057*^9, 3.570781065779727*^9}, {3.5707839119561443`*^9,
  63. 3.57078391905689*^9}, {3.570783950408087*^9, 3.5707839820464973`*^9}}]
  64. }, Open ]]
  65. },
  66. WindowSize->{1132, 999},
  67. WindowMargins->{{4, Automatic}, {Automatic, 4}},
  68. FrontEndVersion->"8.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (October 5, \
  69. 2011)",
  70. StyleDefinitions->"Default.nb"
  71. ]
  72. (* End of Notebook Content *)
  73.  
  74. (* Internal cache information *)
  75. (*CellTagsOutline
  76. CellTagsIndex->{}
  77. *)
  78. (*CellTagsIndex
  79. CellTagsIndex->{}
  80. *)
  81. (*NotebookFileOutline
  82. Notebook[{
  83. Cell[CellGroupData[{
  84. Cell[579, 22, 94, 1, 67, "Section"],
  85. Cell[676, 25, 2055, 37, 170, "Input"]
  86. }, Open ]]
  87. }
  88. ]
  89. *)
  90.  
  91. (* End of internal cache information *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement