![]() |
|
|
+ Search |
![]()
|
Jun 7th, 2001 04:55
Per M Knutsen,
When the value is not zero or one, use the repmat function. repmat is
faster (and more convenient) than other solutions, such as A*ones(M,N),
especially when M and N are very large. If the value you want to put
into the matrix, you may use the ones or zeros function instead.
Example:
>> repmat(1,2,2)
ans =
1 1
1 1