Question

4. [16 marks] The Error Function function is defined as (a) Starting with the series for e, find the series representation o
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc
clear all
close all
Erf=@(x) 2/sqrt(pi)*integral(@(u) exp(-u.^2),0,x);
x=0:0.05:2;
E=[];
Ea=erf(x);
for i=1:length(x)
E(i)=Erf(x(i));
end
plot(x,E,x,Ea,'--g');
legend('Approximation','Exact erf(x)');
fprintf('Approximation of Erf(1) is %f\n',Erf(1));

MATLAB R2018a ② ▼| rch Documentation Log In EDITOR Find Files Compare ▼ Print Run Section New Open Save Advance Runa Figure 1

Add a comment
Know the answer?
Add Answer to:
4. [16 marks] The Error Function function is defined as (a) Starting with the series for e", find the series representation of Erf(x). (b) Use a computer package (eg Matlab, Octave, Excel etc...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT