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

Write a matlab program that reads the text file(as table given is the stress and

ID: 3677800 • Letter: W

Question

Write a matlab program that reads the text file(as table given is the stress and starin values, consider this as a text file that should have to be read out) and outputs (to the command window) the longitudinal Young’s modulus of the composite material. To find the young’s modulus, you may use the following regression model :

l= Where E is the young modulus (pa) s the stran is the strain (- is stress (pa) Use the fprintf command Use the fprintf command with %e format to display your output in the command window. Be sure to not the units

Explanation / Answer

%loading the two columns into two arrays leaving the first line

[stress, strain] = textread(‘fname’,’headerlines’,1);

Sigma1 = 0;

Sigma2 = 0;

%calculating young's modulus

For i = 0:11

                Sigma1 = sigma1 + (stress(i)*strain(i));

                Sigma2 = sigma2 + (strain(i)*strain(i));

end

                Modulus = sigma1/sigma2;

                Fprintf(“value : %e ”,modulus);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote