zeros(m,n) creates a zero value matrix. That is why you are getting all zero matrixes.
If you want values in B matrix, you can use
- ones : which puts 1 in all the element
- (or) rand : which fill your matrix with random number valued between 0 and 1
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!