Unable to use a value of type string as an index

7 visualizaciones (últimos 30 días)
Rithika Varma
Rithika Varma el 23 de Oct. de 2021
Comentada: VBBV el 23 de Oct. de 2021
Where even is the string? I checked the datatypes of all the variables, and they're all either double or uint8.
  3 comentarios
VBBV
VBBV el 23 de Oct. de 2021
Did you assign any numeric value to x in catbl1(catbl1=x)=div*c; ? Change also the line to catbl1(catbl1==x)=div*c;
VBBV
VBBV el 23 de Oct. de 2021
If you don't have numeric value assigned to x it can also be problem

Iniciar sesión para comentar.

Respuestas (1)

Scott MacKenzie
Scott MacKenzie el 23 de Oct. de 2021
Inside your loop, change
catbl1(catbl1=x)=div*c;
to
catbl1(catbl1==x)=div*c;

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by