Difference between revisions of "Matrix multiplication II"

From JSXGraph Wiki
Jump to: navigation, search
Line 9: Line 9:
 
   var v = b1.create('point',[2,2],{style:5,name:'v'});
 
   var v = b1.create('point',[2,2],{style:5,name:'v'});
 
   var w = b1.create('point',[-2,1],{style:5,name:'w'});
 
   var w = b1.create('point',[-2,1],{style:5,name:'w'});
   var va = b1.create('line',[[0,0],v],{straightFirst:false, straightLast:false, lastArrow:true});
+
   var va = b1.create('arrow',[[0,0],v]);
   var wa = b1.create('line',[[0,0],w],{straightFirst:false, straightLast:false, lastArrow:true});
+
   var wa = b1.create('arrow',[[0,0],w]);
  
 
   var v2 = b1.create('point',[
 
   var v2 = b1.create('point',[
Line 18: Line 18:
 
       function() {return a.Value()*w.X()+b.Value()*w.Y();},
 
       function() {return a.Value()*w.X()+b.Value()*w.Y();},
 
       function() {return c.Value()*w.X()+d.Value()*w.Y();}],{style:7,name:"w'"});
 
       function() {return c.Value()*w.X()+d.Value()*w.Y();}],{style:7,name:"w'"});
   var va2 = b1.create('line',[[0,0],v2],{straightFirst:false, straightLast:false, lastArrow:true});
+
   var va2 = b1.create('arrow',[[0,0],v2],{color:'black'});
   var wa2 = b1.create('line',[[0,0],w2],{straightFirst:false, straightLast:false, lastArrow:true});
+
   var wa2 = b1.create('arrow',[[0,0],w2],{color:'black'});
   var t = b1.create('text',[-6,-2,function(){ return '|'+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=|'+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]]

Revision as of 08:46, 25 March 2011