what is the problem for the following commands in MATLAB?

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

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by