Element-wise Multiplication, Transformation matrix.

Hello!
I have a transformation matrix like this.
Adsız.png
Angles are changing depending on time. I have a series of pitch, yaw and roll angle. I created 3 arrays and calculated all the angles in a loop with 54000 iteration. Namely, I have all the angle values in my hand. Right now, I want to insert these angle values to my transformation matrix and calculate trasformation matrix for 54000 iteration.
I tried to solve the problem. First I reshaped all 3 angle arrays, then I tried to calculate the transformation matrix using pointwise operator. My first question is that how can I use pointwise operator when my values are in cos and sin functions. Should I calculate all the cosine and sine values of these values by creating another array? And the other question is that how can I use pointwise operator when I have multiplication of three values?
The solution does not have to be that way. If you have other solution ideas you can write.

댓글 수: 4

Bruno Luong
Bruno Luong 2018년 11월 13일
편집: Bruno Luong 2018년 11월 13일
Pretty much the same method in this thread can be transposed here
hknatas
hknatas 2018년 11월 13일
Actually I tried this first but I encountered a few problems. Such as
cos(x).*sin(y) Is this notation is true?
cos(x).*sin(y).*cos(z) And is this notation is true?
James Tursa
James Tursa 2018년 11월 13일
편집: James Tursa 2018년 11월 13일
Yes, that is the correct notation. The issue you are going to have after doing this is permuting and reshaping the elements to get your individual 3x3 rotation matrices contiguous.
hknatas
hknatas 2018년 11월 13일
Thanks! It worked.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2018년 11월 13일

댓글:

2018년 11월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by