- syms x1 x2 x3 x4 x5 x6
- a = [0 0 0 1;1 0 0 1;2 0 0 1;3 0 0 1;4 0 0 1;5 0 0 1];
- b = [0 x1/2 0 1;1 x2/2 0 1;2 x3/2 0 1;3 x4/2 0 1;4 x5/2 0 1;5 x6/2 0 1];
- c = [0 x1 0 1;1 x2 0 1;2 x3 0 1;3 x4 0 1;4 x5 0 1;5 x6 0 1];
- coefs (:, :, 2) = b
- coefs (:, :, 1) = a
- coefs (:, :, 3) = c
复制代码- >> coefs
-
-
- coefs(:,:,1) =
-
- [ 0, 0, 0, 1]
- [ 1, 0, 0, 1]
- [ 2, 0, 0, 1]
- [ 3, 0, 0, 1]
- [ 4, 0, 0, 1]
- [ 5, 0, 0, 1]
-
-
- coefs(:,:,2) =
-
- [ 0, x1/2, 0, 1]
- [ 1, x2/2, 0, 1]
- [ 2, x3/2, 0, 1]
- [ 3, x4/2, 0, 1]
- [ 4, x5/2, 0, 1]
- [ 5, x6/2, 0, 1]
-
-
- coefs(:,:,3) =
-
- [ 0, x1, 0, 1]
- [ 1, x2, 0, 1]
- [ 2, x3, 0, 1]
- [ 3, x4, 0, 1]
- [ 4, x5, 0, 1]
- [ 5, x6, 0, 1]
复制代码 |