Matrix divide shapes (s/A).
t=s/A
Matrix division between an imat_shp object s and a numeric array A is performed repeatedly at all shape coefficients. This type of operation requires that all elements of s have the same node numbers and DOF, and that the column dimension of s matches the column dimension of A. At each shape coefficient, a matrix or vector the same dimension as s is formed, and the matrix division is computed. The resulting matrix or vector is placed into the shape of the result, with the same nodes and DOF as s. The data attributes of the result are taken from s(1). In particular, the units exponents will be set assuming that A is a unitless quantity.
Note that s/A does not give an ordinate equal to (s.shape)/A. In the first expression, A must have a column dimension equal to the row dimension of s. In the second expression, A must have a column dimension equal to the number of shape coefficients of s.
>> s=imat_shp(3,'shape',reshape(1:18,6,3));
>> s.frequency=(1:3)'
s =
3x1 IMAT Shape with the following attributes:
Row Frequency
Damping NumberNodes
--- ------------------- ------------------- -------------------
1 1 0.01 2
2 2 0.01 2
3 3 0.01 2
>> s.shape % s is 3x1 with 6 shape coefficients
ans =
1 7 13
2 8 14
3 9 15
4 10 16
5 11 17
6 12 18
>> A=(1:3)' % A is 3x1 (ncols = ncols of s)
A =
1
2
3
>> t=s/A; t.shape % t is 3x3 with 6 shape coefficients
ans(:,:,1) =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
ans(:,:,2) =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
ans(:,:,3) =
0.3333 2.3333 4.3333
0.6667 2.6667 4.6667
1.0000 3.0000 5.0000
1.3333 3.3333 5.3333
1.6667 3.6667 5.6667
2.0000 4.0000 6.0000
>> t % Note all outputs have attributes of t(1)
t =
3x3 IMAT Shape with the following attributes:
Row Col Frequency Damping NumberNodes
--- --- ------------------- ------------------- -------------------
1 1 1 0.01 2
2 1 1 0.01 2
3 1 1 0.01 2
1 2 1 0.01 2
2 2 1 0.01 2
3 2 1 0.01 2
1 3 1 0.01
2
2 3 1 0.01 2
3 3 1 0.01 2
>>