comparison index.html @ 34:b6475ae8a2c1

make example matrix inversion operands conformant
author Alex Krolick <whokilledtheelectricmonk@gmail.com>
date Tue, 16 Feb 2016 09:27:45 -0800
parents 7ddf75ff9f24
children 644dbdc82430
comparison
equal deleted inserted replaced
33:80bd8cc6714d 34:b6475ae8a2c1
45 <div class="columns medium-4" > 45 <div class="columns medium-4" >
46 <p>Solve systems of equations with linear algebra operations on <strong>vectors</strong> and <strong>matrices</strong></p> 46 <p>Solve systems of equations with linear algebra operations on <strong>vectors</strong> and <strong>matrices</strong></p>
47 </div> 47 </div>
48 <div class="columns medium-8"> 48 <div class="columns medium-8">
49 {% highlight matlab%} 49 {% highlight matlab%}
50 b = [4 9 2]' % Transposed row vector 50 b = [4; 9; 2] % Column vector
51 A = [ 1 3 1; 51 A = [ 3 4 5;
52 1 3 1;
52 3 5 9 ] 53 3 5 9 ]
53 x = A \ b % Solve the system by inverting A 54 x = A \ b % Solve the system by inverting A
54 {% endhighlight %} 55 {% endhighlight %}
55 </div> 56 </div>
56 </div> 57 </div>