Fortune Telling Collection - Fortune-telling birth date - Matlab array power operation

Matlab array power operation

x=[ 1 3 5 9]

y=[2 4 6 10]

x =

1 3 5 9

y =

2 4 6 10

& gt& gtz=x.^y

z =

1.0e+009 *

0.0000 0.0000 0.0000 3.4868

& gt& gt Why is this the result?

because

Z = X. Y is to calculate the number of digits corresponding to x and y according to this rule, and each digit is calculated in this way. Obviously, the first digit is the square of 1, the second digit is the fourth power of 3, and finally it is the 10 power of 9. The order of magnitude is so large, the values of the first four items are too small for it, which can basically be counted as 0, and the results can be seen. The third floor has been changed to get the specific value.

In addition, there is another saying that "."is exponential at x.^y, for example, 2. 2 is the square of 2. In addition, * stands for matrix. If it is only a scalar operation, you can use, for example.

The values of 2.4 and 2.4 are the same, and both seek the fourth power of 2, but. The scope is wider, and it can be used when the variables are unclear or unclear. It won't be a problem. I don't know if I made it clear. If you have any questions, let's communicate ~-~