I'm currently trying to convert a range of cells imported from a .csv from decimal to hex. However, I keep getting the error:
First argument must contain non-negative integers.
This is despite there not being any negative integers at all in the dataset. This is my current code:
f = @(x) dec2hex(round(x));dataHex = [data(:, 1), varfun(f, data(:, 2:width(data)))];
Any help would be greatly appreciated.
Best Answer