Why do the lines break apart and crack in my plot?

clear
syms z r theta n m
% Define the hypergeometric function
X(z)=2*z*hypergeom([1, 1/n], 1/n+1, z^n)-z+(2*log(z^n-1)+z^n)/(n^2)-(2*pi*1i)/n^2
X(z) = 
Y(z)=z-(1/n^2)*z^n
Y(z) = 
X(z)=subs(X,n,2*m)
X(z) = 
Y(z)=subs(Y,n,2*m)
Y(z) = 
Z(z)=(1/2)*z*hypergeom([1, 1/m], 1/m+1, z^m)-(1/2)*z*hypergeom([1, 1/m], 1/m+1, -z^m)-(1/(2*m^2))*(atanh(z^m)-z^m)
Z(z) = 
% Display the result
X(r,theta)=subs(X,z,r*exp(1i*theta))
X(r, theta) = 
Y(r,theta)=subs(Y,z,r*exp(1i*theta))
Y(r, theta) = 
Z(r,theta)=subs(Z,z,r*exp(1i*theta))
Z(r, theta) = 
val = 1
val = 1
figure
fsurf(real(subs(X,m,val)),imag(subs(Y,m,val)),2*imag(subs(Z,m,val)),[0 1 pi/24 2*pi+pi/24],'MeshDensity',10,'FaceAlpha',.75)
colormap(jet)
shading interp
%Adjust x, y and z axis limits according to the reference image
axis([-1 1 -1 1 -1 1])
set(gcf,'renderer','Painters')
I have this 3-D Plot, in which these lines scatter and break apart which makes the picture look absurd. How can i manually make the lines smooth and continuous by setting some changes in the plot code. i dont want to increase the meshdensity either . how can i do that?

10 Kommentare

contour lines would never cross, so that is not a contour plot.
contour lines can break up if there is nan data.
simran
simran am 11 Sep. 2023
this is not nan data. and this is not a contour plot, i just meant the mesh lines
@simran, please provide the data file and the command(s) used to make the plot. This will help others help you.
simran
simran am 11 Sep. 2023
@William Rose sure, i have shared the code.
The output looks fine on my Mac -- but not on MATLAB Online.
simran
simran am 11 Sep. 2023
Bearbeitet: simran am 11 Sep. 2023
really? can you add a picture of how does it look like ?
and rotated a bit:
What MATLAB version are you using @Walter Roberson?
The lines are broken for me as well - R2021a Update 5 Win 10 Pro
simran
simran am 11 Sep. 2023
@walter Roberson even I'm using R2023 version? What should I do?
Can try the code in MATLAB R2023b Prerelease.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 11 Sep. 2023
Verschoben: Walter Roberson am 11 Sep. 2023

0 Stimmen

It looks like this is something that will be fixed in the upcoming R2023b which should likely be released this week or next.

4 Kommentare

simran
simran am 13 Sep. 2023
what can i do as of now?
If you have Software Maintenance Service (SMS) on a non-Student license (possibly some other license types are also restricted) then you might be eligible to install the R2023b Beta (Preview) release.
If you have a Student license, then you are probably going to need to evaluate the function at a number of points, surf() the result, and then draw any desired lines on top of the surface. It is not immediately clear to me what the lines represent.
R2023b is now available so you can use it.
simran
simran am 15 Sep. 2023
@Walter Roberson yes it worked in R2023b. Thankyou very much, you've been very helpful and kind!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2023a

Gefragt:

am 11 Sep. 2023

Kommentiert:

am 15 Sep. 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by