Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Tring to use a matrix to calculate velocity with 360 degrees, manual angle setting gives the correct velocities but the matrix does not give the same values and they change depending on the size of the matrix. I have tried several things to get it to work but no luck.
Solved! Go to Solution.
Guess that the help files and other docs still have a lot of information ready for you to find out 😉
I am surprised that the yellow result in your screenshot is a single scalar and not a vector!?
Here are four possible ways to create the vector you need in Mathcad without typing in every value manually:
BTW - if the question is answered you should close the thread
Your sheet is somewhat complex, it is hard to understand what you're trying to do. Nothing appears obviously wrong.
Please indicate where unexpected results show up.
Luc
Working with vectors is not the preferred way to doit.
The first discrepancy I notice at Z.Pi
The reason is as follows: The violet expression results in a vector and the green expression results in a vector, too. The product of two vectors is interpreted as a scalar product and the result is a single scalar. Not what you intend. If you want Prime to do the calculation singly for each element of the vectors, you have to tell it so. The operator to use is vectorization (the arrow over an expression).
Here you see the difference:
What happens if you calculate sin(vector) or vector^2. These are operations not defined for vectors and Prime could (should?) throw an error. Instead Prime applies automatic vectorization without you noticing it.
Thats the reason why some of your calculations give the correct result even with vectors and some do not.
So its a good habit to use explicit vectorization in any case. As you can see - with vectorization you get the result you expect:
Nevertheless I think a better approach would be to set up the calculations as functions which are at least dependent on theta (if not additionally on the other variables).
That way you can call later any of those function either with single values or with vectors (you will have to vectorize the function call of course). I am talking about something like this:
That was a great explanation and was very helpful! I am new to Mathcad and that does not come up in the tutorials. I went a slightly different way just because of the number of degrees I wanted to capture and insert an excel sheet and converted the output to a vector. now it is working flawlessly, thanks for the help, it is much appreciated.
Guess that the help files and other docs still have a lot of information ready for you to find out 😉
I am surprised that the yellow result in your screenshot is a single scalar and not a vector!?
Here are four possible ways to create the vector you need in Mathcad without typing in every value manually:
BTW - if the question is answered you should close the thread