Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The Woes of Mathematica

  1. Aug 10, 2006 #1

    I am having a terrible time trying to plot a function in Mathematica that is evaluated to have parts like: Cos(1000t+0.0i)

    When I try and plot it against t, it says that the function is not machine size at many values of t.

    I can't understand why Mathematica is putting 0.0i in there and secondly why it thinks that 0.0i means it can't plot the function. Takign the Re[function] does nothing either.

    There surely must be a way of changing MachinePrecision or FindRoots or something that can eliminate this 0.0i? I really can't understand why Mathematica has such a stupid output for a function that is clearly real.

    There was a second problem, much less substantial; I want to play a sound without producing a graph of the signal, is this possible?

    Big thank-you for anyone who can help,
  2. jcsd
  3. Aug 10, 2006 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    As I said in your previous thread on the same topic, you'd really need to show us the function you're trying to plot for us to really be able to help you. You were not willing to show us the function, for some reason, so I doubt you will show it here, either.

    - Warren
  4. Aug 11, 2006 #3


    User Avatar
    Science Advisor
    Homework Helper

    I don't have any problem plotting that function with Mathematica. Are you using the required square brackets, [ and ], for both the Plot and Cos functions?

    The correct syntax is Plot[Cos[t], {t, tmin, tmax}] where tmin and tmax specify the domain over which you will generate the plot.
  5. Aug 11, 2006 #4
    I am not 100% sure about this but you might want to use the RealOnly Add-On. http://documents.wolfram.com/v5/Add-onsLinks/StandardPackages/Miscellaneous/RealOnly.html" [Broken] is a link that shoul tell you how tu use it. I hope it helps.
    Last edited by a moderator: May 2, 2017
  6. Aug 11, 2006 #5
    The Chop function might allso help. Take a look http://documents.wolfram.com/mathematica/book/section-3.1.4" [Broken].
    Last edited by a moderator: May 2, 2017
  7. Oct 23, 2006 #6
    Make sure to put spaces between objects you are multiplying.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook