I found a way to solve the issue. Probably it isn't the best way to do that, but I post the code, hope will be helpfull
function [out] = fix2dec(input, word_len, fract_len, sign);
% convert a string rapresentation of datas into a vector of decimal values
% input : string
% word_len, fract_len : integer
% sign : boolean (1 signed, 0 unsigned)
%range controls
if ( sign ~= 0 && sign ~= 1 )
error('Sign out of range: 1 signed 0 unsigned');
end
M = zeros(ceil(length(input)/(word_len+2)),word_len+2);
out = zeros(1,ceil(length(input)/(word_len+2)));
for k = 1:1:ceil(length(input)/(word_len+2))-1
for n = 1:1:word_len+2
M(k,n) = input(n+((word_len+2)*(k-1)));
if (n<word_len+1 && n>1)
out(k) = out(k)+(M(k,n)-'0')*2^(word_len-fract_len-n);
end
end
if(sign == 1 && M(k,1) == '1')
out(k) = -2^(word_len-1-fract_len)+out(k);
end
end
end