Message Boards Message Boards

0
|
5782 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?]Plot table of orbital parameters and dynamically change some properties?

Posted 4 years ago

I am computing a table of orbital parameters where I can change some orbital properties. The first time I run the script after a global clear (ClearAll["Global`*"]), the script fails with an error message but if I run it again, it works correctly. I am unable to understand what is happening. An example calculation that I think mirrors the control flow of the calculation is

Column[{Labeled[Manipulate[Module[{},
     y = ConstantArray[14, {10, 4}];
     x = y[[1 ;; n]];
     headings = 
      Map[Style[#, Bold] &, {"col 1", "col 2", "col 3", "col 4"}];
     PrependTo[x, headings];
     Grid[x, Alignment -> Center, Frame -> All, 
      Background -> {None, {LightGray, None}}]], {{n, 1, 
      Style["Nums", 12, Bold]}, Range[10], ControlType -> PopupMenu}],
    Style["Circular Orbits", 16, Bold], Top], 
  Labeled[Manipulate[Module[{},
     y = ConstantArray[k, {10, 4}];
     x = y[[1 ;; m]];
     headings = 
      Map[Style[#, Bold] &, {"col 1", "col 2", "col 3", "col 4"}];
     PrependTo[x, headings];
     Grid[x, Alignment -> Center, Frame -> All, 
      Background -> {None, {LightGray, None}}]], {{m, 1, 
      Style["Nums", 12, Bold]}, Range[10], 
     ControlType -> PopupMenu}, {{k, 1, Style["Const", 12, Bold]}, 
     Range[10], ControlType -> PopupMenu}], 
   Style["Circular Orbits", 16, Bold], Top]}]

This script runs correctly after the global clear. The file that fails is attached. Perhaps someone more skilled at Mathematica can understand what is going on.

Thanks, Mike

Attachments:
POSTED BY: Mike Luntz
2 Replies
Posted 4 years ago
Attachments:
POSTED BY: Hans Milton
Posted 4 years ago

Many thanks, Hans. With my limited understanding of Mathematica I would have never figured that out. Mike

POSTED BY: Mike Luntz
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