Can someone get the answer for me on this? Really appreciated
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
George Abraham
am 8 Feb. 2017
Kommentiert: Gabriel Berkhoudt
am 27 Nov. 2019
The test suite generates a random M x N matrix with a random number of rows and columns that is assigned to the variable A . The element values of the matrix are random double precision numbers that fall in the range from -10 to 10. The matrix has between 5 and 10 rows and between 5 and 10 columns. Assuming A is defined in the workspace, write a script with commands to perform the operations described below and assign the results to the indicated variable names.
- Add a row to the bottom of A that consists of the mean of each column of A and assign the resulting matrix to B.
- Still starting with the original matrix A, add a row to the bottom of A that consists of the sum of each column of A and assign the resulting matrix to C.
- Next add a column to C that consists of the sum of each row of C and assign the resulting matrix to D.
2 Kommentare
Jan
am 8 Feb. 2017
Bearbeitet: Jan
am 8 Feb. 2017
This sound like a homework question. If we solve your homework, you cannot deliver it anymore without cheating.
These are very basic Matlab questions. Reading the "Getting Started" chapters of the documentation will help you to solve this by your own. It would not be useful to rephrase these chapters. Most likely this is not the last Matlab homework for you, therefore I think, you cannot avoid to read the manuals.
If you post, what you have tried so far and ask a specific question, it is very likely, that you get assistance.
Akzeptierte Antwort
Image Analyst
am 8 Feb. 2017
Hint - here's a start (just because I have a son in college undergoing the same thing so I know how it feels). You finish it:
columnMeans = mea....
B = [A; columnMeans];
columnSums = s.......
C = [A; .......
rowSums = sum(C,......
D = [C, rowSums......
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calendar finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!