Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

his is a graded discussion: 100 points possible due 2.7 Discussion MATLAB Progra

ID: 2073488 • Letter: H

Question

his is a graded discussion: 100 points possible due 2.7 Discussion MATLAB Program The MATLAB Program introduces program practices for the topic that is covered in each module. Post your solution/plot files in this discussion. You will post your MATLAB"m' file in 2.7.1 MATLAB File Upload area. Access each discussion several times during the week to read your peers' posts and provide constructive comments. The idea is to create an atmosphere of interaction by posting meaningful responses that advance and expand the depth of the discussion. Access each discussion several times during the week to read your peers posts and provide constructive comments The idea is to create an atmosphere of interaction by posting meaningful responses that advance and expand the depth of the discussion. MATLAB Program Problem For 0 s xs 1 with an increment of 0.1 in x, compute f (z)-, . For this computation, setz-001:1 and then perform element-by-element multiplication (.") operation. Please avoid plugging each x to the function. Using fprintf, print out z and f(z) in two columns with each variable having 8 decimal places. You need to submit both MATLAB program and solution/plot files. These files can be saved to m-fil ipg. or png file. After submitting your homework, please respond to a minimum of two e, MS word, pdf, Submit your homework early last day of this module week in the week and then post all additional responses before 11:59 midnight EST on the Search entries or author Unread 6 Reply Replies are only visible to those who have posted at least one reply Next -

Explanation / Answer

CODE:

x=0:0.1:1;
f=[x;sin(x)./(1+x)]
fid=fopen('plot.txt','wt');
fprintf(fid,'%6.2f%12.8f ',f);

OUTPUT

x= 0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000

f= 0 0.0908 0.1656 0.2273 0.2782 0.3196 0.3529 0.3790 0.3985 0.4123 0.4207