Unable to use a value of type string as an index
7 次查看(过去 30 天)
显示 更早的评论
Where even is the string? I checked the datatypes of all the variables, and they're all either double or uint8.
3 个评论
VBBV
2021-10-23
Did you assign any numeric value to x in catbl1(catbl1=x)=div*c; ? Change also the line to catbl1(catbl1==x)=div*c;
回答(1 个)
Scott MacKenzie
2021-10-23
Inside your loop, change
catbl1(catbl1=x)=div*c;
to
catbl1(catbl1==x)=div*c;
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!