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!

 채택된 답변

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일

0 개 추천

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 ?

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by