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

Asked by Chunling on 15 May 2012
Latest activity Answered by Walter Roberson on 15 May 2012

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!

1 Comment

Oleg Komarov on 15 May 2012

What do you need it for?

Chunling

Products

No products are associated with this question.

2 Answers

Answer by Oleg Komarov on 15 May 2012
Accepted answer

You can create such an array just as a string:

sprintf('%.f. ',ones(10,1))

0 Comments

Oleg Komarov
Answer by 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

Walter Roberson

Contact us