MATLAB Learning Note
1. How to do summation over arbitrary index values within an array ?
For example , an array A with 54 elements , we want to have a summation of index 5, 9 ,32 51 , how can we do that ?
sum(A([5,9,32,51])) will return what we want , and A can be complex or real.
2. How to do easy sliding conjugate multiplication within an array ?
For example , an complex array A with 54 elements , we want to find the sliding conjugate multiplication like A(2) x A(1)* , A(3) x A(2)* ... etc
A(2:54).*conj(A(1:53)) will return what we want
3. How to represent an array with known sub-array ?
For example , an complex sub-array b , we want a array A = [b b b b b b b b ....] with 50 b elements
How can we do this in simple way ?
A = repmat(b,1,50) can get what we want in easy way.
4. Radians to Degree
radtodeg(a)
For example , an array A with 54 elements , we want to have a summation of index 5, 9 ,32 51 , how can we do that ?
sum(A([5,9,32,51])) will return what we want , and A can be complex or real.
2. How to do easy sliding conjugate multiplication within an array ?
For example , an complex array A with 54 elements , we want to find the sliding conjugate multiplication like A(2) x A(1)* , A(3) x A(2)* ... etc
A(2:54).*conj(A(1:53)) will return what we want
3. How to represent an array with known sub-array ?
For example , an complex sub-array b , we want a array A = [b b b b b b b b ....] with 50 b elements
How can we do this in simple way ?
A = repmat(b,1,50) can get what we want in easy way.
4. Radians to Degree
radtodeg(a)
留言
張貼留言