07-27-2022 05:20 PM
@Bob_Schor wrote:
If I needed to do a lot of Vector Norms in my LabVIEW code, I'd create the above-VI, name it something sensible (like "Vector Norm"), make it an Inline routine so it takes almost no memory space and runs at maximum speed, and be done with it.
I would just use this. 😄
07-27-2022 05:34 PM - edited 07-27-2022 05:39 PM
This thread is really not going anywhere.
So we have your data. What exactly are you trying to get out of it? Why are you showing use convoluted code? Does it do what you want?
A "literal" rewrite would be as follows, but I doubt that's really what you need here.
How do you expect the end result to look like? (You said you can do it easily in MATLAB, so just show us the MATLAB code and the apparently correct result.)
07-27-2022 06:03 PM - edited 07-27-2022 06:04 PM
@altenbach wrote:
This thread is really not going anywhere.
So we have your data. What exactly are you trying to get out of it? Why are you showing use convoluted code? Does it do what you want?
A "literal" rewrite would be as follows, but I doubt that's really what you need here.
How do you expect the end result to look like? (You said you can do it easily in MATLAB, so just show us the MATLAB code and the apparently correct result.)
Another student trying to define a plane from 3 points. Cross product of two xyz points is still the normal vector
07-27-2022 06:06 PM
The end result is the joint angle of the elbow. I attached the resultant image from MATLAB. I also posted a snippet of MATLAB code. I think I found a solution to my dot product problem though through previous replies.
08-03-2022 10:08 AM
@mbel wrote:
The end result is the joint angle of the elbow. I attached the resultant image from MATLAB. I also posted a snippet of MATLAB code. I think I found a solution to my dot product problem though through previous replies.
So you have a time series of points in space and want a time series of angles. All you need is calculate the angle for each time point based on the selected coordinates. This seems trivial to do, so please share your solution so we can potentially offer improvements.
08-03-2022 03:33 PM
As @altenbach points out, you have a (time-series of) 3 points in space representing two intersecting straight lines (call the points A, B, and C, with B being the "point in the middle"). If we say "AB" is both the vector from A to B and "BC" the vector from B to C, do you know the (fairly simple) formula for calculating AB · BC (the dot product of AB and BC)? [All you need are the coordinates ...] And, if you know the dot product, with a little more math, you can get the angle between AB and BC, which is your ultimate aim.
Bob Schor