HOW TO get answer in 6 decimal places .

42 vues (au cours des 30 derniers jours)
sadiqa ilyas
sadiqa ilyas le 21 Sep 2019
Hi. I have for example U=0,1,2,3,4,5,6,7
i want to divide each no by 10000. I need the answer in decimal and then find the maximum value of X.Round,ceil,fix does not give me the desired result.
U=unique(point2(:,2));%some values of U
X=round(U/10000);
a=max(X)
  4 commentaires
David Hill
David Hill le 21 Sep 2019
a=sprintf('%0.6f',max(X));
But a will be a charactor array
sadiqa ilyas
sadiqa ilyas le 21 Sep 2019
thanks.

Connectez-vous pour commenter.

Réponse acceptée

David Hill
David Hill le 21 Sep 2019
  1 commentaire
Boddu Meghanadh
Boddu Meghanadh le 9 Mar 2020
can u write that briefly following syntax....with a simple example?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by