Converting to a New Coordinate System

10 Ansichten (letzte 30 Tage)
Hollis Williams
Hollis Williams am 18 Mai 2019
Bearbeitet: Hollis Williams am 19 Mai 2019
I have a column vector and am trying to convert it into a new coordinate system. The way I would like to do this is to start with a column vector of size 1x300, corresponding to 100 1x3 vectors all in one column. I then have 3 matrices A, B and C which are all of size 3x100 each corresponding to 100 vectors in an array. I need to take the first vector from the column and multiply the transpose with the the first vector from the array A to get a scalar which is the first entry in a new column vector, then multiply it with the first vector from B for the second entry and multiply it with the first vector from C for the third entry.
I would then repeat this with all the vectors to get a new 1x300 column vector (this corresponds to converting to a new coordinate system I have created). Let me know if that doesn't make sense or if further explanation is required.
Basically, there are 100 1x3 vectors on top of each other in a column corresponding to 100 nodes, then the the 3 arrays correspond to the normal vectors and two tangent vectors at the 100 nodes, so I am taking each node and multiplying it with the normal at that node (ie. first vector from array A), then the two tangents at that node (ie. first vectors from arrays B and C) to get the vector in the new coordinate system, this is then repeated for all the nodes to get a new column vector.
  2 Kommentare
John D'Errico
John D'Errico am 19 Mai 2019
Bearbeitet: John D'Errico am 19 Mai 2019
It makes no sense at all. Sorry. Typically, a conversion to a new coordinate system would be done using a simple 3x3 matrix multiply, or some other simple transformation. But what you have said is terribly confusing as to your goals. For example, a standard rotation of coordinates involves just a rotation matrix, so a 3x3 matrix multiply. You can do that to all points in one line of code. Or, you might convert from a cartesian coordinate system, into sphereical, cylindrical, etc. All are easy. But what you have said just makes no sense, in context of such a conversion.
So why not give a small example? AND EXPLAIN IT CLEARLY!
Hollis Williams
Hollis Williams am 19 Mai 2019
Bearbeitet: Hollis Williams am 19 Mai 2019
Example: say I have a 3x100 array and I multiply a row vector [0 0 1] into it to get a 1x100 array.
I want to do the same but now I want to multiply the first vector in the 3x100 array with [0 0 1], then the second one with [0 1 0], then the third one with [1 0 0], then go back to [0 0 1] for the fourth vector and carry on cycling through these for the first 75 vectors in the array, then multiply the remaining 25 vectors in the array by [0 0 0]. This way you end up with a 1x100 array as before.
To be more explicit:
[ 0 0 1] * A B ...
C D ...
E F ...
So [0 0 1] multiplies the vector [A C E]^T, then [0 1 0] multiplies the vector [B D F]^T, then
[0 0 1] multiplies the next one and repeat the pattern for the first 75 vectors in the 3x100 array before multiplying the remaining 25 by [0 0 0]. Let me know if this needs clarifiying, this is basically the manipulation which I need to carry out.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by