1
$\begingroup$

I am trying to write a demonstration that plots user defined function and uses this function for further calculations. I tried the following code:

Manipulate[Plot[xx, {t, 0, 1}], {{xx, 0, "x(t)="}}]

I have two questions:

  • This code plots the graph for some functions, but when I try t² in the input field, it does not graph anything (although it graphs t*t) This is a problem, because I would like to use this mainly to ask for polynomials.
  • I would also like to use the input to define the function x(t), (for example to take and use the derivative) but I don't know enough of the mathematica language to do this.

I tried to look at tutorials, but could not find the relevant parts. Any help would be appreciated.

$\endgroup$

closed as off-topic by Karsten 7., dr.blochwave, MarcoB, user9660, m_goldberg Nov 6 '15 at 19:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Karsten 7., dr.blochwave, MarcoB, Community, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    $\begingroup$ t^2 works for me as input. Can you put a screenshot of what you're trying? $\endgroup$ – Patrick Stevens Oct 27 '15 at 12:26
  • $\begingroup$ Sorry, I am not sure how to attach a screenshot, so I try to explain what is happening. On my system (Linux Mint 17.2, Mathematica 10) when I type t^2, it immediately moves the 2 in the superscript. Probably it is an operating system issue, but still, it would be good to know if there is an option to the input field to override this. Also, t^2 (with the 2 in the superscript) is not recognized by Mathematica as an expression, rather it treats it as a variable for some reason. $\endgroup$ – Ferenc Beleznay Oct 27 '15 at 17:23
  • $\begingroup$ One workaround would be to do Power[t, 2] instead of t^2. $\endgroup$ – Patrick Stevens Oct 27 '15 at 17:47
  • $\begingroup$ How do you try to input ? For me it works if I'm using t^2 or t + Ctrl + ^ + 2. It doesn't work if one is using . $\endgroup$ – Karsten 7. Nov 6 '15 at 9:11

Browse other questions tagged or ask your own question.