Plot functions from the command line. For quickly getting a plot a function f(x) for x ∈ [x min , x max ] it could be nice to a have a program that takes the minimum amount of information from the...


Plot functions from the command line.


For quickly getting a plot a function f(x) for x ∈ [xmin, xmax] it could be nice to a have a program that takes the minimum amount of information from the command line and produces a plot on the screen and a hardcopy tmp.eps. The usage of the program goes as follows:




Hint: Make x coordinates from the second and third command-line arguments and then use eval (or StringFunction from Chapters 4.1.4 and 5.4.3) on the first first argument. Try to write as short program as possible (we leave it to Exercise 5.32 to test for valid input). Name of program file: plotf_v1.py.

Nov 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here