How do I add numbers in a cell to another cell?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
"R" = random number
A = {[R R X R]}
B = {[R X R X]}
How do I add the X's in cell "B" to the X in cell "A?"
7 Kommentare
James Tursa
am 2 Mai 2019
So it appears that when you encounter a -10 in CA, you want to add the two immediate neighboring numbers from CB to it. Correct? What if the -10 is on an edge/end?
Antworten (1)
gonzalo Mier
am 1 Mai 2019
A{1}(B{1}==X) = B{1}(B{1}==X)
3 Kommentare
gonzalo Mier
am 1 Mai 2019
Use the solution of James Tursa of the comments: https://www.mathworks.com/matlabcentral/answers/459692-how-do-i-add-numbers-in-a-cell-to-another-cell#comment_700634
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!