Importing hex values from a .txt or .xlsx file
13 views (last 30 days)
Show older comments
I have a function as detailed below:
function [A B C] = elevation (d,p,t)
FC = 360;
d = hex2dec (d);
p = hex2dec (p);
t = hex2dec (t);
A = (d*0.5*FC/2^18);
B = (p*0.5*FC/2^15);
C = (t*0.5*FC/2^15);
I am looking to take the input hex values (d, p, t) from a txt file or spreadsheet although i don't seem to be able to import any values that contain letters.
Does anyone have any ideas where i am going wrong? Should i add additional lines of code to the function to import the data or import the data from the command window?
Any help is much appreciated
0 Comments
Answers (1)
See Also
Categories
Find more on Standard File Formats 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!