Would Write Print Statement Code Matlab Q37079047

How would I write a print statement for this code inMATLAB?

%Integration using Trapizoidal rule nn [100 1000]; for ii=1:2 a:0; b-3; %Integration limit integralValues-zeros(size(ns)); ou

%Integration using Trapizoidal rule nn [100 1000]; for ii=1:2 a:0; b-3; %Integration limit integralValues-zeros(size(ns)); ourFunction-@(x) x.*2.*exp(x); for n-ns val(n)-trapizoidal(ourFunction,a,b,nn(i) end fprintf nlntegration of x 2*exp(x) using Trapizoidal rule for [O 3]n’) fprintf(‘1tTrapizoidal integration value for n-%d is 96f .n.nn(ii),val(end)) end %%Matlab function for Trapizoidal integration function val-trapizoidal(func,a,b,N) % func is the function for integration 96 a is the lower limit of integration % b is the upper limit of integration % N

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.