Question: matlab qestion&&&&&&&&&&&&&& matlab@@@@@@@@@@ matlab$$$$$$$$$$$ matlab&&&&&&&&& matlab@&@@@@@@ matlab$$$$$$$ matlab matlab matlab Given the following mathematical function erf(x) = 2 (-1),21+1 5 n !(2n + 1) a)
Given the following mathematical function erf(x) = 2 (-1)",21+1 5 n !(2n + 1) a) Create a program named q04a.m which asks a user to input x from the keyboard and then de- termines erf(x) to an accuracy of 10-7(convergence criteria). Test your program with erf(0.13). b) Now instead of calculating one point at a time (ie. x=0.13), create a new program named 904b.m which adds a loop to calculate erf(x) in the range -3 Sxs 3 with an increment of 0.01. Store the results in a vector y. Plot the graph of y vs x. Add axis labels (add figure to the report). Save the figure to a file named myplot.jpg. c) Draw a flowchart for your program in part a) Given the following mathematical function erf(x) = 2 (-1)",21+1 5 n !(2n + 1) a) Create a program named q04a.m which asks a user to input x from the keyboard and then de- termines erf(x) to an accuracy of 10-7(convergence criteria). Test your program with erf(0.13). b) Now instead of calculating one point at a time (ie. x=0.13), create a new program named 904b.m which adds a loop to calculate erf(x) in the range -3 Sxs 3 with an increment of 0.01. Store the results in a vector y. Plot the graph of y vs x. Add axis labels (add figure to the report). Save the figure to a file named myplot.jpg. c) Draw a flowchart for your program in part a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
