I am pretty new to MATLAB and I tried many many times to search online for the answer, but I probably failed to formulate my reserch properly.
I am trying to contour plot the equipotentials and streamlines of a doublet flow for my hydrodynamics course. But I cannot undersatnd why every time I run the script, the function is displayed sort of "edgy". And if I increase the steps from like [-10:1:10] to [-10:0.1:10] in the axis paramenters it just shows me a very tiny version (still edgy) of what I was trying to plot before.
Here's my script:
phi = mu*(X./(X.^2+Y.^2));
contour(X,Y,phi, '--r', 'DisplayName', 'Equipotentials')
psi = mu*(Y./(X.^2+Y.^2));
contour(X,Y,psi, '-b', 'DisplayName', 'Streamlines')
title('Plot of Equipotentials and Streamlines of a Doublet Flow')
As you can see the displayed funtion isn't really linear, could someone help?
Thank you so much in advance and apologize for my ignorance.
PS: also, is there a way to show the direction of the flow (arrows to show in which direction it's rotating)?