problem in my program

3 vues (au cours des 30 derniers jours)
Majid Al-Sirafi
Majid Al-Sirafi le 6 Juil 2016
Commenté : Majid Al-Sirafi le 6 Juil 2016
Hi everyone
In the attached program, the value of variable total is up to 255 at all time, in spite of the value must
depend on equation total=n*8 ( where in this case the value of n=95 and total=95*8, but total is 255 and this wrong the value must be 760)
Please, inform me the reason
regards

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 6 Juil 2016
Check the class of n
class(n)
You will find the uint8 class, now try
n=double(95)
n*8
  1 commentaire
Majid Al-Sirafi
Majid Al-Sirafi le 6 Juil 2016
thats OK thank you very much my brother

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox 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