{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lab24i - 3 5 4 7 3 6 4 8 Final Matrix 19 22 43 50 for loop...

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern