lab24i - ] [ 3 * 5 + 4 * 7 ] [ 3 * 6 + 4 * 8 ] Final Matrix...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab Goal : The lab was designed to teach you more about parameters. Lab Description : Read in matrices and perform math operations on them. Sample Output : How many matrices do you wish to enter? :: 3 What is the size of matrix 0 : 2 Enter a value for spot 0 - 0 :: 1 Enter a value for spot 0 - 1 :: 1 Enter a value for spot 1 - 0 :: 1 Enter a value for spot 1 - 1 :: 1 ThreeDRay before setting mat at spot 0 mat 0 mat 1 mat 2 ThreeDRay after setting mat at spot 0 mat 0 row 0 1 1 row 1 1 1 mat 1 mat 2 What is the size of matrix 1 : 2 Enter a value for spot 0 - 0 :: 2 Enter a value for spot 0 - 1 :: 2 Enter a value for spot 1 - 0 :: 2 Enter a value for spot 1 - 1 :: 2 ThreeDRay before setting mat at spot 1 mat 0 row 0 1 1 row 1 1 1 mat 1 mat 2 ThreeDRay after setting mat at spot 1 mat 0 row 0 1 1 row 1 1 1 mat 1 row 0 2 2 row 1 2 2 mat 2 © A+ Computer Science – Matrices – www.apluscompsci.com BONUS OPTION – Matrix Multiplication Matrix Multiplication Logic [ 1 2 ] X [ 5 6 ] [ 3 4 ] [ 7 8 ] [ 1 * 5 + 2 * 7 ] [ 1 * 6 + 2 * 8
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ] [ 3 * 5 + 4 * 7 ] [ 3 * 6 + 4 * 8 ] Final Matrix [ 19 22 ] [ 43 50 ] for loop r rows for loop c cols for loop i inside Computer Science I Lab 24I MATRIX MATH Lab Value - 120 Files Needed :: ThreeDRay.java Lab24i.java What is the size of matrix 2 : 3 Enter a value for spot 0 - 0 :: 3 Enter a value for spot 0 - 1 :: 3 Enter a value for spot 0 - 2 :: 3 Enter a value for spot 1 - 0 :: 3 Enter a value for spot 1 - 1 :: 3 Enter a value for spot 1 - 2 :: 3 Enter a value for spot 2 - 0 :: 3 Enter a value for spot 2 - 1 :: 3 Enter a value for spot 2 - 2 :: 3 ThreeDRay before setting mat at spot 2 mat 0 row 0 1 1 row 1 1 1 mat 1 row 0 2 2 row 1 2 2 mat 2 ThreeDRay after setting mat at spot 2 mat 0 row 0 1 1 row 1 1 1 mat 1 row 0 2 2 row 1 2 2 mat 2 row 0 3 3 3 row 1 3 3 3 row 2 3 3 3 Adding matrix at 0 and matrix at 1 3 3 3 3 A+ Computer Science Matrices www.apluscompsci.com...
View Full Document

Page1 / 2

lab24i - ] [ 3 * 5 + 4 * 7 ] [ 3 * 6 + 4 * 8 ] Final Matrix...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online