Filter löschen
Filter löschen

what is the problem for the following commands in MATLAB?

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

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by