How to create an array like this? with dot after the number
4 views (last 30 days)
Show older comments
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!
Accepted Answer
Oleg Komarov
on 15 May 2012
You can create such an array just as a string:
sprintf('%.f. ',ones(10,1))
0 Comments
More Answers (1)
Walter Roberson
on 15 May 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 ?
0 Comments
See Also
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!