04-19-2021 02:23 PM - edited 04-19-2021 02:24 PM
04-19-2021 02:36 PM - edited 04-19-2021 02:42 PM
Yes, I actually did the same thing. Not sure why we need option "full" for the SVD. Same result (I did not check if the algorithm is sound ;)):
Personally, I would probably go over all diagonal elements and handle values close to zero differently.
04-19-2021 02:53 PM - edited 04-19-2021 02:57 PM
@altenbach wrote:
Personally, I would probably go over all diagonal elements and handle values close to zero differently.
Here's how that could look like (I think the elements of S are always nonnegative, but please verify).
The tolerance can be computed based on the elements and machine epsilon, e.g. as described here)
04-19-2021 05:01 PM
On a side note, you can of course operate on the vector S instead of matrix S. Maybe more efficient. (not tested).
I am sure things could be further optimized....
06-10-2021 06:59 AM
For what its worth I can replicate the original problem on a cRIO (VM) in LabVIEW 2020. Certainly looks like a bug in their RT Linux implementation. Interestingly when I tried it on a Linux desktop it didn't replicate - but I only had LabVIEW 2019 available.
It would be worth sharing your original code with NI through a service request at http://ni.com/ask so they can record it as a LabVIEW bug and hopefully fix it going forward.