Matlab 2016b hex2dec issues
Mostrar comentarios más antiguos
I recently switched from 2014b to 2016b. One of my scripts uses hex2dec. It works fine with 2014b, but not 2016b. I double checked it is related to the version change, but I don't understand where or how. This is the error I am getting: Does anyone have any ideas?
Error using hex2dec>hex2decImpl (line 58)
Input to hex2dec should have just 0-9, a-f, or A-F.
Error in hex2dec (line 23)
d = hex2decImpl(char(h));
9 comentarios
@Andrew: what value does char(h) have? Please show us the output of this:
+char(h)
Andrew
el 12 de Jun. de 2017
Andrew
el 12 de Jun. de 2017
@Andrew: Let me try again: please tell us what this displays:
+whateverinputyouprovidehex2dec
Note the + at the start. You might as well show us this too:
class(whateverinputyouprovidehex2dec)
Walter Roberson
el 13 de Jun. de 2017
Please show us
class(chgFile.textdata(10:3:115,2:6))
double(chgFile.textdata(10:3:115,2:6))
Andrew
el 13 de Jun. de 2017
Walter Roberson
el 13 de Jun. de 2017
Editada: Walter Roberson
el 13 de Jun. de 2017
Is it possible that you are using R2017a rather than R2016b ? There was a change to R2017a for importdata to default to returning text items as the new (as of R2016b) string() class, and that can lead to the kind of difficulty you are seeing. I seldom use importdata...
Andrew
el 13 de Jun. de 2017
Respuestas (0)
Categorías
Más información sobre Filename Construction en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!