Speeding up repetitive initialisation with structured data?
You should be able to prevent casting to a string 100 times.

First create all strings in a cell array, then just loop over the strings.



Though it does not show up on the profiler, this looks higly dubious:

i=num2str(i)
ubs_str(i)=i/100;


Now you will get the character code of 'i' and divide that by 100.