I got output as:
1.0000 0 1.0000 0.0116
Now i want it as:
1 0 1 0.0116
(since [1 0 1] is my code word that is remove decimal points from 1.000)
please help!

 Réponse acceptée

Paulo Silva
Paulo Silva le 8 Juin 2011

0 votes

num2str([1 0 1 .0116]') %this just shows the values in string format
Remove the ' if you want the values in a line

Plus de réponses (1)

Andrei Bobrov
Andrei Bobrov le 8 Juin 2011

1 vote

format short g

3 commentaires

Paulo Silva
Paulo Silva le 8 Juin 2011
nice one, I always forget the g
Paulo Silva
Paulo Silva le 8 Juin 2011
+1 vote
Andrei Bobrov
Andrei Bobrov le 8 Juin 2011
Thanks Paulo

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by