how to replace values in matrix across entire row
1 view (last 30 days)
Show older comments
Kumaresan Karunanidhy
on 4 Sep 2022
Commented: Kumaresan Karunanidhy
on 4 Sep 2022
I want to replace current values in a particular row of matrix with different values for each index in that particular row
0 Comments
Accepted Answer
Walter Roberson
on 4 Sep 2022
%example data
A = randi(9, 8, 4)
%example row-based operations
A(3,:) = A(3,:).^2 - 2
A(6, :) = randi([10 19], 1, 4)
More Answers (0)
See Also
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!