Effacer les filtres
Effacer les filtres

how to subtract a number from matrix

1 vue (au cours des 30 derniers jours)
kyin gab
kyin gab le 18 Juin 2013
Hello,
I have a 8 X 8 matrix, m. I want to subtract 127 from it (ie from each number). I did it like this x = m - 127;
The problem I am getting is that it shows 0 where a number is supposed to be negative.
Is there something I am missing?
Thank you.
  1 commentaire
kyin gab
kyin gab le 18 Juin 2013
got it. I used x = double(m) - 127;

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by