Adding all the rows of a matrix
Show older comments
I have a matrix A=[1 0 3 0 0; 0 1 0 1 0]; I have B=sum(A); B=[1 1 3 1 0]; After performing some operation on this matrix B let my matrix B is B=[0.1 0.1 0.25 0.1 0], How can I get back A=[0.1 0 0.25 0 0; 0 0.1 0 0.1 0]. Note: This operation can only be performed on Matrix B. Can anybody help? Thanks in advance
3 Comments
Rik
on 11 Apr 2018
This is not yet a Matlab problem. How would you describe a method? I can't see any way in which your second A matrix is related to either other matrix. Once you explain that, I might be able to help with the implementation.
Rik
on 11 Apr 2018
Have you seen what you posted? It is unreadable. Select the code you have in your comment and click the {}Code button.
And if you have working code, what is your question?
Khadija Khan
on 11 Apr 2018
Edited: Khadija Khan
on 11 Apr 2018
Answers (1)
Khadija Khan
on 11 Apr 2018
0 votes
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!