Mathematica Plotting 2D Graph in Mathematica: y>=340 & y<340

  • Thread starter Thread starter James Wine
  • Start date Start date
  • Tags Tags
    2d Graphing
AI Thread Summary
The discussion centers around a request for Mathematica code to plot a specific graph that evaluates certain conditions for variable y at discrete time units t. The user seeks to visualize two scenarios: one where y is greater than or equal to 340, and another where y is less than 340. The provided code snippets aim to plot these conditions over a time range from 0 to 20. However, there is a noted limitation in the current code, as it does not extend the graph for y to infinity. The user expresses a need for a solution but is unable to test the code until returning home due to being on the road for work.
James Wine
Messages
8
Reaction score
0
If someone could supply the code to plot this graph in Mathematica would be awesome.

Would also be best if it checked the y's at units of t {0,1,2,3...,inf}

y >= 340
Plot[100 (t) - 340 (t/2), {t, 0, 20}]
y< 340
Plot[100 (t) - 115 (t/2) , {t, 0, 20}]
 
Last edited:
Physics news on Phys.org
Plot3D[Piecewise[{{100 t-340 t/2, y>=340}, {100 t-115 t/2, y<340}}], {t, 0, 20}, {y, 0, 1000}]

but that does not graph y to infinity.
 
Thank you, sadly I won't be able to check it until i get home. On the road working.
 

Similar threads

Replies
8
Views
2K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
5
Views
2K
Replies
1
Views
2K
Back
Top