...
fprintf('The values of the stress are:\n \t %3.2f MPa \t %3.2f MPa \t %3.2f MPa.\n\n', sigma_x(1), sigma_x(6), sigma_x(11));
Before we part, let's remind ourselves of some important programming guidelines that we have followed in this tour:
- Develop code incrementally, testing obsessively at each stage. Develop a plan for how you are going to build your code before you sit at the computer.
- Dig through the MATLAB help diligently to figure out how to use specific functions etc. Usually, the examples are the best place to start. This is a better strategy than desperately hunting for the TA every time you need help with your code.
- Comment your program liberally.
See and rate the complete Learning Module
...