Adding a row to an unknown matrix - the row consists of the mean value of the columns of the unknown matrix.
9 次查看(过去 30 天)
显示 更早的评论
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.
I am trying to add a row into an unknown matrix - the row has to consist of the mean of the columns of the unknown matrix.
Does anyone have ideas?
Thank you,
Gabe
0 个评论
采纳的回答
James Tursa
2019-11-25
Hints:
doc mean
The last row of the matrix A is A(end,:). Then ask yourself: What would be the indexing of one row beyond "end"?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!