Plotting inequalities on the complex plane
32 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dimitrios Anagnostou
am 6 Jan. 2024
Beantwortet: Torsten
am 7 Jan. 2024
Despite using Matlab for several years, I am little ashamed but I have no idea how to plot the set on the complex plane that satisfies
where
. Is there any way to visualize such inequalities graphically on the complex plane, using Matlab? Should I use fimplicit or fcontour? Something other? Thanks in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584261/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584266/image.png)
0 Kommentare
Akzeptierte Antwort
Torsten
am 7 Jan. 2024
It's only left to decide whether it's inside or outside ...
z = @(x,y)x+1i*y;
f = @(x,y)abs(1+z(x,y)+z(x,y).^2) - 4;
fimplicit(f)
0 Kommentare
Weitere Antworten (1)
Sulaymon Eshkabilov
am 6 Jan. 2024
Is that what you are trying to attain:
% Grid size:
N = 100;
% Defined grid in X and Y planes:
[X, Y] = meshgrid(linspace(-4, 4, N), linspace(-4, 4, N));
% Create a grid of complex numbers:
Z = X + 1i * Y;
% Compute the Inequality by the given condition:
C = abs(1 + 2 * Z + Z.^2) < 4;
% Plot the set that satisfies the given Inequality Condition C:
scatter(real(Z(C)), imag(Z(C)), 'b.')
xlabel('Re part')
ylabel('Imag part')
title('Complex Plane Set at |1 + 2z + z^2| < 4')
grid on
0 Kommentare
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!