Replace values in a matrix with values from another matrix if a condition is met
Show older comments
Hi,
So I have 3 matrices A, B and C
I want to check the Values in A and B (they are the same size), if the value in A exceeds the Value in B replace it with the value in B (only for that column) then output the result to C (or even just change A)
Essentially:
a = [11 25 55 75 105]
b = [15 30 50 80 100]
c = [11 25 50 75 100]
any solutions?
thanks in advance
Accepted Answer
More Answers (0)
Categories
Find more on Multidimensional Arrays 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!