Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can you fix this MATLAB code please? EDITOR PUBLISH VIEW E La Find Files Run Section 5 Run and Advance Advance Run and Time RUN
can you fix this MATLAB code please?
EDITOR PUBLISH VIEW E La Find Files Run Section 5 Run and Advance Advance Run and Time RUN 3 Compare - Go To New Open Save EDIT Breakpoints Run Print Find - FILE NAVIGATE BREAKPOINTS 1 Qerf = []; 2 X = []; for x = 0.1:0.1:1.0 4 Q = (2/sqrt).(pi))*quadtx(f, 0, x); 5 Qerf = [Qerf; 0); X = [X; x]; 7 end Merf = erf(x); 9 ErfErr = abs(Qerf - Merf); 10 subplot(2,1,1) 11 plot(X,Merf); 12 hold on 13 plot(X, Qerf, 'r'); 14 legend('built in erf', 'erf approx with quadtx'); 15 xlabel('x'); 16 ylabel('erf(x)') 17 title('erf vs. quadtx approx to erf') 18 subplot(2,1,2) 19 semilogy (X, ErfErr) 20 xlabel('x') 21 ylabel('abs(erf(x) - approx erf(x))')Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started