Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Include Page
SIMULATION: MATLAB Google AnalyticsSIMULATION:
MATLAB Google Analytics
Include Page
SIMULATION: Intro Learning Module - PanelSIMULATION:
Intro Learning Module - Panel

...

The correct syntax for creating a function is:

function return_value = function_name(parameter_1, parameter_2,...)

...

You can be lazy like me and copy-and-paste the last two statements from your previous code. Save this file as bending_stress, which is the name that MATLAB automatically assigns the file. Thus, the function name and the file name have the same name. 
Bring up beam3.m in the MATLAB editor. Make a copy of beam3.m using Save As ...  and call the new file beam5.m. In this file, comment out the lines below since this calculation is now done within the function.

...