MATLAB: What is the problem for the following commands in MATLAB

inputoutput

m=input('Give integer value')
fprintf('%.(%d)f',m,x(i))
Here , I want to show decimal value after point according to inputed value.

Best Answer

fprintf('%.*f', m, x(i))