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

1 visualizzazione (ultimi 30 giorni)
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!

Risposta accettata

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

Più risposte (1)

Walter Roberson
Walter Roberson il 15 Mag 2012
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 ?

Categorie

Scopri di più su Operators and Elementary Operations 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