Azzera filtri
Azzera filtri

How to include zero contour

4 visualizzazioni (ultimi 30 giorni)
University
University il 9 Ott 2023
Commentato: University il 11 Ott 2023
Hi,
In the .m file attached, I have a plot of a contour.
The plot for the contour is on line 111. Please how can I include the contour at imag(taumin)=0.

Risposta accettata

Walter Roberson
Walter Roberson il 10 Ott 2023
taumin is not complex, so imag(taumin) is zero everywhere. There is no contour to create.
You initialize
taumin=ones(nu,nxi);
which is not complex.
You set
taumin(i,j)=min(tausolR);
where
tausolR=imag(tausol_found);
You extract the imaginary component from tausol_found so the result is a strictly real number, and real numbers always have an all-zero imaginary component.
If the task is to include 0 in the level list then use
LL = union(0, min(min(taumin)):10000:max(max(taumin)));
contourf(U,Xi,taumin,LL);
Beware though, that min(min(taumin)) is -4.32538271227367e-07 and max(max(taumin)) is 1, so min(min(taumin)):10000:max(max(taumin)) is -4.32538271227367e-07:10000:1 which is just -4.32538271227367e-07
  9 Commenti
Walter Roberson
Walter Roberson il 11 Ott 2023
N=[0:0.1:1];
map = [0.95*(1-N') 0.95*(1-N') N'];
fig = openfig('cont1.fig');
fig.Visible = true;
ax = fig.Children(2);
C = ax.Children;
X = C.XData;
Y = C.YData;
Z = C.ZData;
figure();
surf(X, Y, Z); view(3)
colormap(map); colorbar;
That gives me a much better understanding of the data than the contour plot does. The contour plot gives no feeling for the sharp trenches.
University
University il 11 Ott 2023
Okay, thank you so much for your help. I get what you mean.

Accedi per commentare.

Più risposte (1)

Torsten
Torsten il 9 Ott 2023
You want to plot imag(taumin(U,xi)) = 0.
Thus use fimplicit:
  3 Commenti
Torsten
Torsten il 10 Ott 2023
Modificato: Torsten il 10 Ott 2023
But in principle, you can compute "taumin" given U and xi ? This would define a function.
Maybe this method is easier to implement:
University
University il 10 Ott 2023
Okay Torsten. Thank you for your repsonse. I will try it.

Accedi per commentare.

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by