One problem is that your fprintf format string contains lots of the numeric format specifier %f, but you are providing inputs which are character vectors! This will not work:
fprintf(fid,'...%f...\n',...,'some char vector',...)
^^ %f is for numbers, not char vectors!
Either you will need to use the string specifier %s, something like this:
fprintf(fid,'...%s...\n',...,'some char vector',...)
^^ %s is for strings/char vectors!
Or just put all of the names directly into the format string:
fprintf(fid,'Person ID;pos1;pos2;Width;height;X centre;Y centre\n');
How to use the fprintf format strings is explained in the fprintf documentation.