This MatLab Coding. Please submit the code for this. If you are not strong with
ID: 3119664 • Letter: T
Question
This MatLab Coding. Please submit the code for this. If you are not strong with matlab please dont answer. please answer all aspects of the question.
This MatLab Coding. Please submit the code for this. If you are not strong with matlab please dont answer. please answer all aspects of the question.
l. Print and submitl When designing structures, it is important to know the physical properties of your construction materials, and the forces that will be exerted on those materials after construction is complete. For example, we often use fasteners like bolts and screws to bear loads in static and mechanical constructions. Two ofthe types of loads that fasteners must bear are called tension and shear loads. Load Tension Joint Shear Joint Images from and numbers adapred from Fastenal Technical Reference Guide, suenal.comtyconrent documenty FastenaltechnicalReferenceGuide. While tension loads put strain on the fastener lengthwise, in a stretching motion, and shear loads put strain on the fastener in a cross direction, in a bending or snapping motion. Fasteners are made from different materials, each with different tensile and shear "strengths." The strength of a material is defined as the maximum load that it can bear in a certain direction without deforming, Maternal Shear Strength (poundsin Tensile Strength (pounds/im) Grade Steel 13,000 60,000 Grade Steel 0000 70,000 Grade Steel 5 000 Grade 4 Steel 100,000 Titanium 90,000 120,000 write a function in MATLAB that has two inputs A shear load (as the first input) A tension load (as the second input) Have it return, as an output, a string of the name of the lowest grade material from the table above that can handle those loads. If none of these materials can handle the load, please retum the string "Consider a redesign!" For example, if you wrote: grade ToUse Recitation3Problemi(40,000,80,000), disp(grade ToUse) You would see the string "Grade 3 Steel" printed to the command line. Please do not put user input statements (aka the "input" function) or print statements ("disp" or "display") in place of inputs and outputs in a function header, or anywhere in this program.Explanation / Answer
Matlab Code
function f = Recitation3Problem1 (a,b)
if (a <= 33000) & (b <= 60000)
disp('Grade 1 steel')
else if (a <= 55000) & (b <= 70000)
disp('Grade 2 steel')
else if (a <= 65000) & (b <= 85000)
disp('Grade 3 steel')
else if (a <= 80000) & (b <= 100000)
disp('Grade 4 steel')
else if (a <= 90000) & (b <= 120000)
disp('Titanium')
else disp('Consider a redesign')
end
end
end
end
end
Testing :-
>> Recitation3Problem1 (5800,65000)
Grade 2 steel
>> Recitation3Problem1 (44000,75000)
Grade 3 steel
>> Recitation3Problem1 (84000,75000)
Titanium
>> Recitation3Problem1 (84000,130000)
Consider a redesign
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.