CREATE A ASCRIPT FOR THIS MATLAB CODE LIKE A SENTENCE FORM OF THE STEP BY STEP OF CODE disp ('Calculation of Youngs Modulus and Stress Strain Curves')  reply = input('Tensile testing? (y/n): ', 's'); if strcmp(reply,'y')   disp('Continue to calculate Youngs Modulus and Stress Strain Curves ')         Load1 = input('Enter value for Load 1 (in Newton): ');         Load2 = input('Enter value for Load 2 (in Newton): ');         Load3 = input('Enter value for Load 3 (in Newton): ');         Load4 = input('Enter value for Load 4 (in Newton): ');         Load5 = input('Enter value for Load 5 (in Newton): ');         Load6 = input('Enter value for Load 6 (in Newton): ');         Load7 = input('Enter value for Load 7 (in Newton): ');         Load8 = input('Enter value for Load 8 (in Newton): ');         Extension1 = input('Enter value for Extension 1 (in meter): ');         Extension2 = input('Enter value for Extension 2 (in meter): ');         Extension3 = input('Enter value for Extension 3 (in meter): ');         Extension4 = input('Enter value for Extension 4 (in meter): ');         Extension5 = input('Enter value for Extension 5 (in meter): ');         Extension6 = input('Enter value for Extension 6 (in meter): ');         Extension7 = input('Enter value for Extension 7 (in meter): ');         Extension8 = input('Enter value for Extension 8 (in meter): ');         InitialDiameter = input('Enter value for Initial Diameter (in meter): ');         InitialLength = input('Enter value for Initial Length (in meter): ');         Area = (1/4)*pi*(InitialDiameter^2);         A = ['Area (in m3) is ', num2str(Area)];         disp(A)         Stress1 = Load1/Area;         Stress2 = Load2/Area;         Stress3 = Load3/Area;         Stress4 = Load4/Area;         Stress5 = Load5/Area;         Stress6 = Load6/Area;         Stress7 = Load7/Area;         Stress8 = Load8/Area;         Strain1 = Extension1/InitialLength;         Strain2 = Extension2/InitialLength;         Strain3 = Extension3/InitialLength;         Strain4 = Extension4/InitialLength;         Strain5 = Extension5/InitialLength;         Strain6 = Extension6/InitialLength;         Strain7 = Extension7/InitialLength;         Strain8 = Extension8/InitialLength;         YM1 = Stress1/Strain1;         YM2 = Stress2/Strain2;         YM3 = Stress3/Strain3;         YM4 = Stress4/Strain4;         YM5 = Stress5/Strain5;         YM6 = Stress6/Strain6;         YM7 = Stress7/Strain7;         YM8 = Stress8/Strain8;         Stress = [Stress1; Stress2; Stress3; Stress4; Stress5; Stress6; Stress7; Stress2];         Strain = [Strain1; Strain2; Strain3; Strain4; Strain5; Strain6; Strain7; Strain8];         YoungsModulus = [YM1; YM2; YM3; YM4; YM5; YM6; YM7; YM8];         T = table(Stress, Strain);         T.('Youngs Modulus') = YoungsModulus         y = [Stress1, Stress2, Stress3, Stress4, Stress5, Stress6, Stress7, Stress8];         x = [Strain1, Strain2, Strain3, Strain4, Strain5, Strain6, Strain7, Strain8];         plot(x, y, '-bo', 'LineWidth', 2, 'MarkerEdgeColor', 'c', 'MarkerFaceColor', 'y', 'MarkerSize', 5), grid on, xlabel('Strain'), ylabel('Stress'), title('Graph of Stress Strain Curves')         f = msgbox('Operation Completed','Success'); elseif strcmp(reply,'n')     f = msgbox('Cannot Continue to Calculate Youngs Modulus and Stress Strain Curves', 'Error','error'); end

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

CREATE A ASCRIPT FOR THIS MATLAB CODE

LIKE A SENTENCE FORM OF THE STEP BY STEP OF CODE


disp ('Calculation of Youngs Modulus and Stress Strain Curves') 
reply = input('Tensile testing? (y/n): ', 's');
if strcmp(reply,'y')
  disp('Continue to calculate Youngs Modulus and Stress Strain Curves ')
        Load1 = input('Enter value for Load 1 (in Newton): ');
        Load2 = input('Enter value for Load 2 (in Newton): ');
        Load3 = input('Enter value for Load 3 (in Newton): ');
        Load4 = input('Enter value for Load 4 (in Newton): ');
        Load5 = input('Enter value for Load 5 (in Newton): ');
        Load6 = input('Enter value for Load 6 (in Newton): ');
        Load7 = input('Enter value for Load 7 (in Newton): ');
        Load8 = input('Enter value for Load 8 (in Newton): ');
        Extension1 = input('Enter value for Extension 1 (in meter): ');
        Extension2 = input('Enter value for Extension 2 (in meter): ');
        Extension3 = input('Enter value for Extension 3 (in meter): ');
        Extension4 = input('Enter value for Extension 4 (in meter): ');
        Extension5 = input('Enter value for Extension 5 (in meter): ');
        Extension6 = input('Enter value for Extension 6 (in meter): ');
        Extension7 = input('Enter value for Extension 7 (in meter): ');
        Extension8 = input('Enter value for Extension 8 (in meter): ');
        InitialDiameter = input('Enter value for Initial Diameter (in meter): ');
        InitialLength = input('Enter value for Initial Length (in meter): ');
        Area = (1/4)*pi*(InitialDiameter^2);
        A = ['Area (in m3) is ', num2str(Area)];
        disp(A)
        Stress1 = Load1/Area;
        Stress2 = Load2/Area;
        Stress3 = Load3/Area;
        Stress4 = Load4/Area;
        Stress5 = Load5/Area;
        Stress6 = Load6/Area;
        Stress7 = Load7/Area;
        Stress8 = Load8/Area;
        Strain1 = Extension1/InitialLength;
        Strain2 = Extension2/InitialLength;
        Strain3 = Extension3/InitialLength;
        Strain4 = Extension4/InitialLength;
        Strain5 = Extension5/InitialLength;
        Strain6 = Extension6/InitialLength;
        Strain7 = Extension7/InitialLength;
        Strain8 = Extension8/InitialLength;
        YM1 = Stress1/Strain1;
        YM2 = Stress2/Strain2;
        YM3 = Stress3/Strain3;
        YM4 = Stress4/Strain4;
        YM5 = Stress5/Strain5;
        YM6 = Stress6/Strain6;
        YM7 = Stress7/Strain7;
        YM8 = Stress8/Strain8;
        Stress = [Stress1; Stress2; Stress3; Stress4; Stress5; Stress6; Stress7; Stress2];
        Strain = [Strain1; Strain2; Strain3; Strain4; Strain5; Strain6; Strain7; Strain8];
        YoungsModulus = [YM1; YM2; YM3; YM4; YM5; YM6; YM7; YM8];
        T = table(Stress, Strain);
        T.('Youngs Modulus') = YoungsModulus
        y = [Stress1, Stress2, Stress3, Stress4, Stress5, Stress6, Stress7, Stress8];
        x = [Strain1, Strain2, Strain3, Strain4, Strain5, Strain6, Strain7, Strain8];
        plot(x, y, '-bo', 'LineWidth', 2, 'MarkerEdgeColor', 'c', 'MarkerFaceColor', 'y', 'MarkerSize', 5), grid on, xlabel('Strain'), ylabel('Stress'), title('Graph of Stress Strain Curves')
        f = msgbox('Operation Completed','Success');
elseif strcmp(reply,'n')
    f = msgbox('Cannot Continue to Calculate Youngs Modulus and Stress Strain Curves', 'Error','error');
end

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education