convert matrix from hexadecimal to decimal
Show older comments
I have a large square matrix in hexadecimal notation and i need to transform it to decimal. for instance consider this:
A = [af 2 3; a2 b 9; c d f];
I want the result in the form:
A = [175 2 3;162 11 9; 12 13 15];
Since I have a very large matrix so I am not able to write {'af'} instead of [af] e.t.c.
2 Comments
Please start with providing the inputs in valid Matlab syntax. "[af 2 3; a2 b 9; c d f]" is not working as input. Now it matters if you mean:
A = {'af', '2', '3'; 'a2', 'b', '9'; 'c', 'd', 'f'}
or
A = ['af 2 3'; 'a2 b 9'; 'c d f']
or maybe this is a string found in a text file?
What does "not able to write {'af'} instead of [af] e.t.c" exactly mean? Where do the inputs come from?
tanveer haq
on 4 Jan 2019
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!