Question

Make two lists of applications of matrices, one for those that require jagged matrices and one...

Make two lists of applications of matrices, one for those that require jagged matrices and one for those that require rectangular matrices. Now, argue whether just jagged, just rectangular, or both should be included in a programming language.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

Significance: Both the arrays should be included in a programming language as they both possess a unique feature, sense of usage. Both can be used in a different set of algorithms and are used as per their perspectives. While jagged matrices help in managing the memory space by allocating only the needed amount, at the same time rectangular matrices are simpler to use as they can be treated as a single object rather than array or arrays.

A rectangular array is an array which possesses more than one index in the same array. Here all rows have the same number of columns. A 3 by 9 multidimensional rectangular array will contain 27 cells in total. The declaration of rectangular array is as follows:

arrayName[rows][columns]

For example, rarr[7][9]

Applications requiring rectangular matrices:

1. If there is a need to store M grades of N students, then it will be better to use M by N rectangular arrays as shown below:

2. They may also be used to store personal information like weight, height and Date of birth of each person in a society.

A jagged array is also known as an "array of arrays"  A jagged array is also multidimensional, but it is not necessary for each "dimension" of the jagged array to have an equal number of "elements" The declaration of a jagged array is as follows:
arrayName[rows,columns]

For example,

jarr[7,9]

Applications requiring jagged matrices:

1. If there is a need to store grades of students in which one student drops and other student earns extra points, then it will be better to use jagged arrays as shown below:

​​​​​​​

Here the rows have the different number of columns. Alice has dropped out, so there are only two grades for her whereas Bob earned an extra credit, and thus that row has an extra column.

2. They may also be used to store the temperature of each day in various months. As each month has a different number of days, they may be stored in jagged arrays.

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Make two lists of applications of matrices, one for those that require jagged matrices and one...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT