Can someone get the answer for me on this? Really appreciated
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
George Abraham
el 8 de Feb. de 2017
Comentada: Gabriel Berkhoudt
el 27 de Nov. de 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 comentarios
Jan
el 8 de Feb. de 2017
Editada: Jan
el 8 de Feb. de 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.
Respuesta aceptada
Image Analyst
el 8 de Feb. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Calendar en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!