When trying to plot the streamlines in a non-rectangular domain using the streamslice function, the streamslice function plots the streamlines in a rectangular domain which is defined by the corner-coordinates in X and Y. Any datapoints outside of this rectangular domain are not included, and any areas where there is no data is interpolated. Is there any way to specify the shape of the domain which the stramslice function should use when plotting the streamlines?
The following illustrates the problem.
figure
[X,Y] = meshgrid([0:4],[0:4]);
Ynew = Y + (X-2).^2;
streamslice(X,Ynew,ones(5,5),ones(5,5))
The domain is 'parabolic' but streamlines are plotted in a rectangular domain.