Matrix multiplication II: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
var v = b1.create('point',[2,2],{style:5,name:'v'}); | var v = b1.create('point',[2,2],{style:5,name:'v'}); | ||
var va = b1.create('arrow',[[0,0],v]); | var va = b1.create('arrow',[[0,0],v]); | ||
var v2 = b1.create('point',[ | var v2 = b1.create('point',[ | ||
function() {return a.Value()*v.X()+b.Value()*v.Y();}, | function() {return a.Value()*v.X()+b.Value()*v.Y();}, | ||
function() {return c.Value()*v.X()+d.Value()*v.Y();}],{style:7,name:"v'"}); | function() {return c.Value()*v.X()+d.Value()*v.Y();}],{style:7,name:"v'"}); | ||
var va2 = b1.create('arrow',[[0,0],v2],{color:'black'}); | var va2 = b1.create('arrow',[[0,0],v2],{color:'black'}); | ||
var t = b1.create('text',[-8,5,function(){ return 'Matrix=|'+b1.round(a.Value(),2)+' '+b1.round(b.Value(),2)+'|'+'<br>'+'|'+b1.round(c.Value(),2)+' '+b1.round(d.Value(),2)+'|';}]); | var t = b1.create('text',[-8,5,function(){ return 'Matrix=<br>|'+b1.round(a.Value(),2)+' '+b1.round(b.Value(),2)+'|'+'<br>'+'|'+b1.round(c.Value(),2)+' '+b1.round(d.Value(),2)+'|';}]); | ||
b1.unsuspendUpdate(); | b1.unsuspendUpdate(); | ||
</jsxgraph> | </jsxgraph> | ||
[[Category:Examples]] | [[Category:Examples]] |