How to create an array like this? with dot after the number

Hi, Can anyone tell me how can I create an array like this in matlab? 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.
thank you very much!

 Akzeptierte Antwort

Oleg Komarov
Oleg Komarov am 15 Mai 2012
You can create such an array just as a string:
sprintf('%.f. ',ones(10,1))

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 15 Mai 2012

0 Stimmen

There is no numeric difference between that and the array without the dot.
Is the dot for display purposes? If so then what is it being displayed to ?

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by