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

1 回表示 (過去 30 日間)
Chunling
Chunling 2012 年 5 月 15 日
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!

採用された回答

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 5 月 15 日
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 ?

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by