User Tools

Site Tools


notes:tools:matlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
notes:tools:matlab [2019/10/03]
leszek
notes:tools:matlab [2019/10/03] (current)
leszek
Line 50: Line 50:
 v = [1 2] ; w = [3 4]; cosine = v * w' / (norm(v) * norm(w)) v = [1 2] ; w = [3 4]; cosine = v * w' / (norm(v) * norm(w))
 cosine = 0.9839 cosine = 0.9839
 +</​code>​
 +
 +Angle (in radians) between two unit-length vectors:
 +<code matlab>
 +i = [1 0] ; j = [0 1] ; cosine = i * j' ; angle = acos(cosine)
 +angle = 1.5708
 </​code>​ </​code>​
  
notes/tools/matlab.txt ยท Last modified: 2019/10/03 by leszek