Message Boards Message Boards

0
|
2074 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Formatting Table function output using an AssociationThread function

Posted 1 year ago
POSTED BY: Mitchell Sandlin

I asked chatGPT how to add a column to a matrix. It gave me two answers. The first method was wrong (it adds a row, not a column). The second answer was good: using Join with a level 2 specification:

tbl0 = {{0.9`, 0.0584241190299567`, 0.11844662926936303`},
   {0.925`, 0.054724560329369586`, 0.12214618796995014`},
   {0.95`, 0.04991634521614036`, 0.12695440308317937`},
   {0.975`, 0.042537120230813234`, 0.1343336280685065`},
   {0.99`, 0.03395717645392384`, 0.14291357184539588`},
   {0.995`, 0.02811484358968761`, 0.14875590470963213`}};
ci = {".80", ".85", ".90", ".95", ".98", ".99"};
Join[Map[List, ci], tbl0, 2] // TableForm
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract