i cant understand this variable initialization
Show older comments
hello everyone !! im new in matlab ... can anyone please explain me how a matrix X can contain values greater than 2 after the following initialization : X = [randn(100,2)+ones(100,2);... randn(100,2)-ones(100,2)];
i thought that rand() gives random values in the interval 0-1..and when adding ones() the values will be between 1 and 2.
M I missing something ?
thanks in advance.
Accepted Answer
More Answers (1)
lyes
on 30 Dec 2013
0 votes
Categories
Find more on Logical 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!