How can a 4 element array index pull stored string values?
Mostrar comentarios más antiguos
Hi all, I am new to MATLAB and I'm a bit stuck trying to figure out this part.
Let's say I have a 4 element vector [1x4 double] stored called "fourElementVector" (I have a function that changes these numbers a bit, situationally)
I also have a 256x1 cell "HexData" that stores a bunch of hexadecimal strings (ranging from 16bit to 128bit)
I'm trying to make the fourElementVector be the index and pull the values stored in HexData and store them as a string like:
[0B287 0B287 0B287 0B287] (just for an example. I don't want them converted)
The 4vector will always have a stored index numbers ranging from 1 - 256, and I have 256 hex codes, so it matches.
What do you think? How might I achieve this?
Respuesta aceptada
Más respuestas (1)
the cyclist
el 18 de Jun. de 2021
Can you upload examples of your variables fourElementVector and HexData, in a MAT file? This would be helpful.
But it seems from your description that
HexData{fourElementVector}
might do what you intend?
1 comentario
Akana Juliet
el 18 de Jun. de 2021
Categorías
Más información sobre Matrix Indexing 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!