how to multiply two columns with hexadecimal data in a table
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Padmamalini T H
le 29 Jan 2020
Réponse apportée : Vinai Datta Thatiparthi
le 3 Fév 2020

i imported the above table which has hexadecimal data. i need to multiply column6 and column7 and convert them to decimal.
i used the following code,
c = x(:,6).*x(:,7)
but it is not working.
can someone please. i searched everwhere and dint get an answer. please reply if anyone knows the answer.
0 commentaires
Réponse acceptée
Vinai Datta Thatiparthi
le 3 Fév 2020
Hello,
Use the MATLAB function hex2dec to convert text representation of a hexadecimal number into a decimal number first. After this step, your code should work fine.
Hope this helps!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables 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!