Overview
You are required to complete the MATLAB Engineering Mathematics assignment fully and correctly according to all instructions provided in the coursework specification.
Requirements:
- Solve all four tasks completely and accurately.
- Use MATLAB only.
- Ensure all codes are written professionally with clear comments and proper formatting.
- Follow the exact function names and formats required in the assignment.
- Ensure all functions are self-contained and do not rely on external custom functions except built-in MATLAB functions.
- Test all codes carefully before submission to avoid syntax or logical errors.
- Ensure compatibility with recent MATLAB versions.
Deliverables Required:
- All MATLAB .m files for every task and subtask.
- Any required function files.
- All plotting and visualization scripts.
- Ensure all figures and outputs appear correctly when running the scripts.
Task Requirements:
TASK 1:
- Create a user-defined MATLAB function to calculate the total surface area of a cylinder.
- Create a temperature conversion script from Celsius to Fahrenheit using user input and formatted tables with fprintf.
- Calculate the first 10 square pyramidal numbers.
- Create a proper 3D visualization using plot3 or scatter3 with labels, title, colors, and equal axis scaling.
TASK 2:
- Implement Hooke’s Law calculations for the provided spring constants.
- Prompt the user for displacement and generate a formatted force table.
- Plot multi-curve comparisons for different displacement ranges and all spring constants on the same figure.
- Include legends, labels, grid, and suitable plot formatting.
TASK 3:
- Create a complete prism geometry script.
- Allow user input for polygon vertices and extrusion height.
- Implement the shoelace formula in a function named according to the assignment instructions.
- Use subfunctions to compute edge lengths and perimeter.
- Compute and display:
- Base Area
- Perimeter
- Volume
- Lateral Surface Area
- Total Surface Area
- Add validity checks for zero-area polygons.
- Include optional 3D prism visualization using plot3.
TASK 4:
- Create a function to classify a 3×3 linear system as:
- Unique solution
- No solution
- Infinitely many solutions
- Solve the system using matrix methods if a unique solution exists.
- Create a script that prompts the user to enter all coefficients and vector values.
- Plot the three planes in 3D space.
- If a unique solution exists, plot and annotate the intersection point.
- Add labels, legends, transparency, title, and proper visualization formatting.
Important Notes:
- Ensure all outputs are neatly formatted.
- Ensure all graphs are clear and professional.
- Use meaningful variable names and sufficient comments throughout the code.
- Make sure the assignment is fully complete and ready for direct submission.
- Send all MATLAB source files after completion.
- Double-check all mathematical formulas and calculations for correctness.