Filter löschen
Filter löschen

how to multiply two columns with hexadecimal data in a table

4 Ansichten (letzte 30 Tage)
pic.png
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.

Akzeptierte Antwort

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi am 3 Feb. 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!

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by