Let me comment your lines
for i = 1:size(change,2)
in this case you don't need size(change,2), size(change) is enough because MATLAB recognises that there is only one dimension >1.
2.- The same applies to the variable you intend to use to collect the results, b, you are indexing b(1,i) but with indexing b(i) would be enough.
3.- Azzi Abdelmalek is right, the main error is using fix(), instead use round(), or you can also use floor()
b(2,:) = change
don't see use either.
So, you write 'it works perfectly until the final loop' (?) yet when I run your lines the variable you intend to use to collect the result, b, is empty, so, it's not that 'doesn't work perfectly', simply, it doesn't work.
The following works, I renamed your 'b' to 'change', seems reasonable, doesn't it? and your 'change' I call it 'base', as you are actually decomposing the amount into a base, aren't you have a look:
base = [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01];
So, Jonathan, having commented where your code doesn't work,
would you please mark my answer as ACCEPTED ANSWER
or at least click on the thumbs-up vote
Thanks in advance