Unable to use a value of type string as an index
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/776133/image.png)
Where even is the string? I checked the datatypes of all the variables, and they're all either double or uint8.
3 Kommentare
VBBV
am 23 Okt. 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;
Antworten (1)
Scott MacKenzie
am 23 Okt. 2021
Inside your loop, change
catbl1(catbl1=x)=div*c;
to
catbl1(catbl1==x)=div*c;
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!