Question: % define the range nn = 2 0 ; % define the loop for calculation of error sum 1 = 0 ;sum 2 = 0
define the range
nn;
define the loop for calculation of error
sum;sum;
for ii:nn;
formula and values
sum;sum
for jj:ii
sumsumjjjjfactorialjj;
sumsumjjfactorialjj;
end
fvaliisum;
fvaliisum;
formula and true errors
etiiabsfvaliiexpexp;
etiiabsfvaliiexpexp;
end;
formula and relative approxilate errors
ea;
ea;
ea;
ea;
for kk:nn;
eakkabsfvalkkfvalkkexp;
eakkabsfvalkkfvalkkexp;
end
Ttablefval',eteafval',etea;
filenameC:UsersuserDocumentsMATLABreltruerror.xlsx;
writetableTfilename,'sheet','WriteVariableNames',false;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
