Search code examples
wolfram-mathematica

Mathematica Plot error


I want to plot Sin and Cos function in the same system.

But this code

  Plot[{Sin[x], Cos[t]}, {x, 0, 5}, {t, 0, 6}]

lead to this error: Plot::nonopt: "Options expected (instead of {t,0,5}) beyond position 2 in Plot[{Sin[x],Cos[t]},{x,0,5},{t,0,5}]. An option must be a rule or a list of rules"


Solution

  • According to the documentation, you have to use the same variable x for all functions.