what is the problem for the following commands in MATLAB?

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

Accepted Answer

Walter Roberson
Walter Roberson on 26 Dec 2020
fprintf('%.*f', m, x(i))

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!