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

[Processing] += operator, function equivalent?

  1. Sep 15, 2014 #1
    Hi, I was curious how I could turn any expression that looks like:

    x += (100- x) * 0.01;

    into a function that could be graphed.
     
  2. jcsd
  3. Sep 15, 2014 #2

    rcgldr

    User Avatar
    Homework Helper

    You need a second parameter, perhaps time (t) in order to generate a 2d graph.

    t = ...
    x = ...

    ...

    t += delta_t;
    x += (100- x) * 0.01;
     
  4. Sep 15, 2014 #3
    Ah, of course...thanks.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook