Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A=[1 2 3;4 5 6; 7 8 9];
- A =
- 1 2 3
- 4 5 6
- 7 8 9
- [m,n]=size(A)
- m=3
- n=3
- > x<-c(1:10)
- > x
- [1] 1 2 3 4 5 6 7 8 9 10
- > A=matrix(0,10,10)
- > A=Toeplitz(x,c(x[1],rev(x[-1])))
- > A
- [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
- [1,] 1 10 9 8 7 6 5 4 3 2
- [2,] 2 1 10 9 8 7 6 5 4 3
- [3,] 3 2 1 10 9 8 7 6 5 4
- [4,] 4 3 2 1 10 9 8 7 6 5
- [5,] 5 4 3 2 1 10 9 8 7 6
- [6,] 6 5 4 3 2 1 10 9 8 7
- [7,] 7 6 5 4 3 2 1 10 9 8
- [8,] 8 7 6 5 4 3 2 1 10 9
- [9,] 9 8 7 6 5 4 3 2 1 10
- [10,] 10 9 8 7 6 5 4 3 2 1
- > n=size(A)
- > n
- [1] 10 10
- >[ m,n]=size(A)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement