Algebra/Matrius
ALG MAT suma
Considerem les matrius A= #A i B= #B. Calcula A + B.
Per sumar dues matrius has de sumar cada element d'A amb el corresponent element de B. La matriu resultant ha de tenir la mateixa dimensió que les matrius que sumes.
1
0.1
0
0
0
#C
Molt bé.
#C
Atenció, revisa els càlculs perquè tens alguns elements incorrectes.
«session lang=¨en¨ version=¨2.0¨»«library closed=¨false¨»«mtext style=¨color:#ffc800¨ xml:lang=¨es¨»variables«/mtext»«group»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»a«/mi»«mo»=«/mo»«mi»random«/mi»«mo»(«/mo»«mn»2«/mn»«mo»,«/mo»«mn»4«/mn»«mo»)«/mo»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»b«/mi»«mo»=«/mo»«mi»random«/mi»«mo»(«/mo»«mn»1«/mn»«mo»,«/mo»«mn»4«/mn»«mo»)«/mo»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»A«/mi»«mo»=«/mo»«mfenced close=¨]¨ open=¨[¨»«mrow»«mfenced close=¨]¨ open=¨[¨»«mrow»«mi»random«/mi»«mfenced»«mrow»«mo»-«/mo»«mn»5«/mn»«mo»,«/mo»«mn»5«/mn»«/mrow»«/mfenced»«mo»§nbsp;«/mo»«mi»with«/mi»«mo»§nbsp;«/mo»«mi»j«/mi»«mo»§nbsp;«/mo»«mi»in«/mi»«mo»§nbsp;«/mo»«mn»1«/mn»«mo».«/mo»«mo».«/mo»«mi»b«/mi»«/mrow»«/mfenced»«mo»§nbsp;«/mo»«mi»with«/mi»«mo»§nbsp;«/mo»«mi»i«/mi»«mo»§nbsp;«/mo»«mi»in«/mi»«mo»§nbsp;«/mo»«mn»1«/mn»«mo».«/mo»«mo».«/mo»«mi»a«/mi»«/mrow»«/mfenced»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»B«/mi»«mo»=«/mo»«mfenced close=¨]¨ open=¨[¨»«mrow»«mfenced close=¨]¨ open=¨[¨»«mrow»«mi»random«/mi»«mfenced»«mrow»«mo»-«/mo»«mn»5«/mn»«mo»,«/mo»«mn»5«/mn»«/mrow»«/mfenced»«mo»§nbsp;«/mo»«mi»with«/mi»«mo»§nbsp;«/mo»«mi»j«/mi»«mo»§nbsp;«/mo»«mi»in«/mi»«mo»§nbsp;«/mo»«mn»1«/mn»«mo».«/mo»«mo».«/mo»«mi»b«/mi»«/mrow»«/mfenced»«mo»§nbsp;«/mo»«mi»with«/mi»«mo»§nbsp;«/mo»«mi»i«/mi»«mo»§nbsp;«/mo»«mi»in«/mi»«mo»§nbsp;«/mo»«mn»1«/mn»«mo».«/mo»«mo».«/mo»«mi»a«/mi»«/mrow»«/mfenced»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»C«/mi»«mo»=«/mo»«mi»A«/mi»«mo»+«/mo»«mi»B«/mi»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»i«/mi»«mo»=«/mo»«mn»1«/mn»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»j«/mi»«mo»=«/mo»«mn»1«/mn»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»c«/mi»«mo»=«/mo»«mn»0«/mn»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»test«/mi»«mo»(«/mo»«mi»x«/mi»«mo»)«/mo»«mo»:«/mo»«mo»=«/mo»«apply»«csymbol definitionURL=¨http://www.wiris.com/XML/csymbol¨»begin«/csymbol»«mtable»«mtr»«mtd»«apply»«csymbol definitionURL=¨http://www.wiris.com/XML/csymbol¨»while«/csymbol»«mrow»«mi»i«/mi»«mo»§les;«/mo»«mi»a«/mi»«/mrow»«mtable»«mtr»«mtd»«apply»«csymbol definitionURL=¨http://www.wiris.com/XML/csymbol¨»while«/csymbol»«mrow»«mi»j«/mi»«mo»§les;«/mo»«mi»b«/mi»«/mrow»«mtable»«mtr»«mtd»«apply»«csymbol definitionURL=¨http://www.wiris.com/XML/csymbol¨»if«/csymbol»«mrow»«msub»«mi»x«/mi»«mrow»«mi»i«/mi»«mo»,«/mo»«mi»j«/mi»«/mrow»«/msub»«mo»§ne;«/mo»«msub»«mi»C«/mi»«mrow»«mi»i«/mi»«mo»,«/mo»«mi»j«/mi»«/mrow»«/msub»«/mrow»«mrow»«mi»c«/mi»«mo»=«/mo»«mi»c«/mi»«mo»+«/mo»«mn»1«/mn»«/mrow»«/apply»«/mtd»«/mtr»«mtr»«mtd»«mi»j«/mi»«mo»=«/mo»«mi»j«/mi»«mo»+«/mo»«mn»1«/mn»«/mtd»«/mtr»«/mtable»«/apply»«/mtd»«/mtr»«mtr»«mtd»«mi»i«/mi»«mo»=«/mo»«mi»i«/mi»«mo»+«/mo»«mn»1«/mn»«/mtd»«/mtr»«mtr»«mtd»«mi»j«/mi»«mo»=«/mo»«mn»1«/mn»«/mtd»«/mtr»«/mtable»«/apply»«/mtd»«/mtr»«mtr»«mtd»«apply»«csymbol definitionURL=¨http://www.wiris.com/XML/csymbol¨»if«/csymbol»«mrow»«mi»c«/mi»«mo»§gt;«/mo»«mn»0«/mn»«mo»§and;«/mo»«mi»c«/mi»«mo»§les;«/mo»«mfenced close=¨§rfloor;¨ open=¨§lfloor;¨»«mrow»«mi»a«/mi»«mo»·«/mo»«mi»b«/mi»«mo»/«/mo»«mn»2«/mn»«/mrow»«/mfenced»«/mrow»«mrow»«mi»return«/mi»«mo»§nbsp;«/mo»«mn»1«/mn»«/mrow»«mrow»«mi»return«/mi»«mo»§nbsp;«/mo»«mn»0«/mn»«/mrow»«/apply»«/mtd»«/mtr»«/mtable»«/apply»«/math»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨/»«/input»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨/»«/input»«/command»«/group»«/library»«group»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»A«/mi»«/math»«/input»«output»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfenced»«mtable»«mtr»«mtd»«mo»-«/mo»«mn»3«/mn»«/mtd»«/mtr»«mtr»«mtd»«mn»4«/mn»«/mtd»«/mtr»«mtr»«mtd»«mn»2«/mn»«/mtd»«/mtr»«mtr»«mtd»«mo»-«/mo»«mn»3«/mn»«/mtd»«/mtr»«/mtable»«/mfenced»«/math»«/output»«/command»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»B«/mi»«/math»«/input»«output»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfenced»«mtable»«mtr»«mtd»«mn»1«/mn»«/mtd»«/mtr»«mtr»«mtd»«mn»1«/mn»«/mtd»«/mtr»«mtr»«mtd»«mo»-«/mo»«mn»1«/mn»«/mtd»«/mtr»«mtr»«mtd»«mo»-«/mo»«mn»5«/mn»«/mtd»«/mtr»«/mtable»«/mfenced»«/math»«/output»«/command»«/group»«group»«command»«input»«math xmlns=¨http://www.w3.org/1998/Math/MathML¨/»«/input»«/command»«/group»«/session»editor=true&testFunctionName%5B1%5D=test&testFunction%5B12229%5D=1