Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.3K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

How to hide function params (args?) in output

Posted 2 years ago

Correct me if I'm wrong, but I have to specify the parameter of a variable in order to later be able to take a derivative, however this clutters up my output and makes it harder to read. Is there a way to hide the parameter [t] in the output?

I have tried (and read the docs on) various forms of replace, replace all, repeated replace all, and Format[], but I don't understand Mathematica well and could use some help.

POSTED BY: Casey Lapoint
6 Replies
Posted 2 years ago

Separate what is for display from what is for calculation

POSTED BY: Hans Milton
Posted 2 years ago

That is IT! Thank you!

POSTED BY: Casey Lapoint
Posted 2 years ago

I don't think I really understand what the problem is, but if you want to show the thetas without the [t], then just do that. E.g.

R = {{1, 0, 0}, {0, Cos[\[Theta]], Sin[\[Theta]]}, {0, -Sin[\[Theta]],Cos[\[Theta]]}}

(I ditched the subscripts for clarity in this example.)

POSTED BY: Eric Rimbey
Posted 2 years ago

That's what I am talking about in my original question. If you don't include the information that theta is a function of time, then you cannot take a time derivative. As you can see below, the solution you propose does not allow for derivatives because Mathematica loses the information on what it would be with respect to:

My question could be split into two or three, maybe simpler questions, any could solve my problem.

  1. Is there a way to tell Mathematica that theta is a function of time without it being displayed in the output
  2. Is there a way to format the output so that all the [t] are hidden
  3. Is there a way to manipulate the resulting matrix to remove all of the [t]'s and then display that I've tried this by using variations of P1a //. [t] :> null

The reasoning for all of this is that I need to present my results. Of course, I can convert everything to LateX and rewrite it all more legibly, but for what I am doing, just presenting a well-annotated notebook would be perfect, except that the resulting output is so long that it becomes illegible and difficult to fit on a page. Being able to state at the beginning that there is an f(t) and then omitting it afterward is a standard way to help with readability.

POSTED BY: Casey Lapoint
Posted 2 years ago

Are the thetas actual functions or just quantities/parameters?

POSTED BY: Eric Rimbey
Posted 2 years ago

They are functions of time, but the function is not defined anywhere. The fact that they are f(t) is only relevant because I need to differentiate with them.

POSTED BY: Casey Lapoint
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard