Timeline for How to plot this function?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 10, 2014 at 11:33 | history | edited | Mark McClure | CC BY-SA 3.0 |
added 431 characters in body
|
May 10, 2014 at 11:23 | vote | accept | Gabriel Romon | ||
May 10, 2014 at 11:18 | comment | added | Mark McClure |
@GabrielR. _?NumericQ is useful to prevent evaluation prior to an actual number being plugged in and I use it out of habit when defining functions using numerical procedures. Strictly speaking, it's not necessary here. If you were to try to plot $f'$, however, some errors would be issued. The With construct is simply a scoping mechanism to declare n as local. Module could have been used just as well.
|
|
May 10, 2014 at 11:09 | comment | added | Gabriel Romon | The output looks exactly like what I had in mind. Could you elaborate on the "With[{n=Floor[x]}]" and NumericQ ? It's the first time I see them. Thanks. | |
May 10, 2014 at 11:02 | history | answered | Mark McClure | CC BY-SA 3.0 |