fix issue #430 and make sure quiver3 works for any case #433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally this issue #430 had problems with making MATLAB
quiver3work for multiple axes. That problem was easy to fix. However, testing several examples withquiver3I realized that the barb of the arrows did not work well in 3D. The barb of the 2D arrows did, but the 3D case did not.The structure that MATLAB returns when using
quiverandquiver3does not return the barb coordinates of the arrows, it only returns the initial and final coordinates for each arrow. Therefore, the calculation of the barb coordinates must be done manually. Doing this in the 2D case is very simple, but in the 3D case it is a very complex geometric problem. For this reason doing this update took time.Fortunately I managed to figure out everything I needed by completely recoding the
updateQuiver.mfile. Now thequiverandquiver3functions work great for all cases. Also, I took the opportunity to fix the code style.Below I share examples
Example 1
Example 2
Example 3
Example 4