Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
We'll work in the <span style="color: purple"><strong><em>Command Window</em></strong></span> and enter the MATLAB commands at the prompt <span style="color: purple"><strong><em>&gt;&gt;</em></strong></span>. Create matrix <span style="color: blue"><em>A</em></span> by entering {{A = \[1 1; 0 12\]}} at the command prompt:

A semi-colon is used to start a new matrix row. Note that MATLAB shows you the resulting values for the elements of A. Similarly, create matrix B:

...

Calculate the reaction matrix R using the \ operator by entering R = A\B.

Are these the values you expect?

...

Any line beginning with a % will be skipped over by MATLAB; these are for human eyes only. You should libreally add comments to your program to remind yourself what it does. Otherwise, a few months (or days!) down the line, you'll look at it, wonder what all the fuss is about and curse the ^&^*%%&* author.

...