Message Boards Message Boards

0
|
2525 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Creating table in Manipulate?

Posted 2 years ago

Dear Members, I trying to show the outputs in a table format (image example attached) into the manipulate output. I've tried, Column and Grid are not working. Kindly please help. Thanks

Manipulate[TextGrid[Solve[
   -0.64 p2 + 342 t2 == (Kilogram - 35) &&
    3.5 p2 - 108 t2 == (Meter - 178) &&
    0.089 p2 + 29 t2 == (Centimeter + 6.2) &&
    0.09 p2 + 2.1 t2 == (Liter + 0.62) &&
    147 p2 + 4200 t2 == (Inch + 4000) &&
    31 p2 + 4020 t2 == (Pound + 2400)]],
 {{p2, 6, "Lorries"}, 6, 35, Appearance -> "Labeled"},
 {{t2, 0.2, "Cars"}, 0.2, 0.8, Appearance -> "Labeled"}]
Attachment

Attachments:
POSTED BY: Ma noj
3 Replies
Posted 2 years ago

Here is one way

Manipulate[
 Grid[List @@@ 
   First@
    Solve[-0.64 p2 + 342 t2 == (Kilogram - 35) && 
      3.5 p2 - 108 t2 == (Meter - 178) && 
      0.089 p2 + 29 t2 == (Centimeter + 6.2) && 
      0.09 p2 + 2.1 t2 == (Liter + 0.62) && 
      147 p2 + 4200 t2 == (Inch + 4000) && 
      31 p2 + 4020 t2 == (Pound + 2400)], 
  Frame -> All], {{p2, 6, "Lorries"}, 6, 35, 
  Appearance -> "Labeled"}, {{t2, 0.2, "Cars"}, 0.2, 0.8, 
  Appearance -> "Labeled"}]
POSTED BY: Rohit Namjoshi
Posted 2 years ago

Hello Mr. Rohit, It works fine. Thank you very much for your usual kind help

POSTED BY: Ma noj
Posted 2 years ago

Hi Manoj

You are welcome. Try adding the following option to Grid. It will align the units column to the left and the values column by the decimal point.

Alignment -> {{Left, "."}}
POSTED BY: Rohit Namjoshi
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