Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. TableForm[Table[{x + y, x - y}, {x, 10}, {y, 10}], TableHeadings -> {Table[x, {x, 10}], Table[y, {y, 10}]}]
  2.  
  3. Grid[{
  4. {" ", "x y", Sequence @@ Table[x, {x, 10}]},
  5. Sequence @@ MapThread[Prepend /* Flatten,
  6. {
  7. Table[Column[{x + y, x - y}], {x, 10}, {y, 10}],
  8. Table[{Column[{"x+y", "x-y"}], x}, {x, 10}]
  9. }]
  10. },
  11. Dividers -> {{2 -> True, 3 -> True}, 2 -> True}]
  12.  
  13. TableForm[Table[
  14. {x + y, x - y}, {x, 5}, {y, 5}],
  15. TableHeadings -> {Table[x, {x, 10}], Table[y, {y, 10}],{x+y,x-y}}]
  16.  
  17. fileName=CreateTemporary[];
  18. st=OpenWrite[fileName,FormatType-> OutputForm];
  19. Write[st,TableForm[
  20. Table[{x + y, x - y}, {x, 5}, {y, 5}],
  21. TableHeadings -> {Table[x, {x, 5}], Table[y, {y, 5}],{x+y,x-y}},
  22. TableAlignments-> {Right,Top,Right}],
  23. ];
  24. Close[st];
  25. Import[fileName]
  26.  
  27. ToString@Format[TableForm[
  28. Table[{x+y,x-y},{x,5},{y,5}],
  29. Table‌​Headings->{Table[x,{‌​x,5}],Table[y,{y,5}]‌​,{x+y,x-y}},
  30. TableAli‌​gnments->{Right,Top,‌​Right}],OutputForm]
  31.  
  32. flatTableForm[Table[{x + y, x - y}, {x, 10}, {y, 10}],
  33. TableHeadings -> {Table[x, {x, 10}],
  34. Table[y, {y, 10}], {x + y, x - y}}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement