Hi, i found an easy way to modify vectline to add the "density option" as shown in the youtube vid of RobertThalbertPhD.
Open the vectline.m and save as e.g. "vectline_a.m",then add another input variable "a" to the 1. line of the m.file to obtain
"function vectline(f,crdaxis,crdrange,a)". Then replace the "5" with an "a" in the lines 27,28,29 and 55,56 to obtain
Now the number of vectors in 2D will be a^2 and in 3D a^3.
Note that now you have to pass a number that will specify how many vectors are plottet in each direction, else you will receive an error.
Hello. Interesting code. I need this kind of graphs for my work but I cannot understand what it actually plots. Could you please tell me more about those arrows. What do they show and which values of a function are involved in the plotting? Thank you. Alex.