Replace values in a matrix with values from another matrix if a condition is met
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Multidimensional Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!