0
|
3863 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
GROUPS:

# Why can't I plot a list of functions that plot fine individually?

Posted 11 years ago
 I have a function,v[t] = E^(t (Quantity[-0.2, 1/("Seconds")])) (Quantity[-49.`, ("Meters")/( "Seconds")]) + t (Quantity[0, ("Meters")/("Seconds")^2]) +Quantity[49, ("Meters")/("Seconds")]and I want to plot this function in the same plot as the line t = 49.This works, and plots v[ t] by itself:Plot[Evaluate[v[t]], {t, Quantity[0, "Seconds"], Quantity[30, "Seconds"]}, PlotRange -> {0, 50}]But if I add t = 49 to it, like this, than v does not plot and I can only see the line at t = 49:Plot[{Evaluate[v[t]], 49}, {t, Quantity[0, "Seconds"], Quantity[30, "Seconds"]}, PlotRange -> {0, 50}]If I take out the 49, like so, I get a blank graph:Plot[{Evaluate[v[t]]}, {t, Quantity[0, "Seconds"], Quantity[30, "Seconds"]}, PlotRange -> {0, 50}]So for some reason v[ t] plots fine on its own but not when it is part of a list of functions enclosed by curly braces, even if it is the only function in the list.  What could be the cause of this?  Is there any other way I can get these two functions in the same plot together?
2 Replies
Sort By:
Posted 11 years ago
 Try moving Evaluate outside your list of plot functions.Plot[Evaluate[{v[t], 49}], {t, Quantity[0, "Seconds"],   Quantity[30, "Seconds"]}, PlotRange -> {0, 50}]
Posted 11 years ago
 That solved the problem for me.  Thanks