Question: my coding on MATLAB is still wrong; can I get a correction for it please EDITOR PUBLISH VIEW o ? O Run Run Section Run

 my coding on MATLAB is still wrong; can I get a

my coding on MATLAB is still wrong; can I get a correction for it please

EDITOR PUBLISH VIEW o ? O Run Run Section Run and g, Advance Advance RUN Run and Time La Find Files Insert Efx 3 Compare -Go To Comment %% New Open Save Breakpoints Print Find - Indent 5 FILE NAVIGATE EDIT BREAKPOINTS 1 % Problim 3 2 Qerf = 0 x = 0 for x=0.1:.1:1.0 5 - Q=2/sqrt(pi)*quadtx(f,0,x); 6 - Qerf = [Qerf:0]; 7- X = [X;x]; 8 end 9 Merf = erf(x); 10 ErfErr = abs(Qerf - Merf); 11 subplot(2,1,1) 12 plot(X, Merf); 13 hold on 14 - plot(X, Qerf, 'r'); 15 - legend('built in erf', 'erf apprix with quadtx'); 16 - xlabel('x'); 17 - ylabel('erf(x)') 18 title('erf vs. quadtx approx to erf') 19 subplot(2,1,2) 20 semilogy (X, ErfErr) 21 xlabel('x') 22 ylabel('abs(erf(x) - approx erf(x))'); EDITOR PUBLISH VIEW o ? O Run Run Section Run and g, Advance Advance RUN Run and Time La Find Files Insert Efx 3 Compare -Go To Comment %% New Open Save Breakpoints Print Find - Indent 5 FILE NAVIGATE EDIT BREAKPOINTS 1 % Problim 3 2 Qerf = 0 x = 0 for x=0.1:.1:1.0 5 - Q=2/sqrt(pi)*quadtx(f,0,x); 6 - Qerf = [Qerf:0]; 7- X = [X;x]; 8 end 9 Merf = erf(x); 10 ErfErr = abs(Qerf - Merf); 11 subplot(2,1,1) 12 plot(X, Merf); 13 hold on 14 - plot(X, Qerf, 'r'); 15 - legend('built in erf', 'erf apprix with quadtx'); 16 - xlabel('x'); 17 - ylabel('erf(x)') 18 title('erf vs. quadtx approx to erf') 19 subplot(2,1,2) 20 semilogy (X, ErfErr) 21 xlabel('x') 22 ylabel('abs(erf(x) - approx erf(x))')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!