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
    Hi,

    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,
    Natski
     
  2. jcsd
  3. Aug 10, 2006 #2

    chroot

    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

    Tide

    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. Here is a link that shoul tell you how tu use it. I hope it helps.
     
  6. Aug 11, 2006 #5
    The Chop function might allso help. Take a look here and here.
     
  7. Oct 23, 2006 #6
    Make sure to put spaces between objects you are multiplying.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: The Woes of Mathematica
  1. In mathematica (Replies: 4)

  2. Mathematica and Sums (Replies: 4)

  3. Mathematica Sums (Replies: 6)

  4. Mathematica NDSolve (Replies: 27)

Loading...