I need to plot eigen values with Imaginary axis in log scales?

Need help to plot eigen values with Imaginary axis in log scales?

2 件のコメント

Siddhant Maurya
Siddhant Maurya 2022 年 12 月 8 日
otherwise plotting eigen values with real axis in log scales will also do?
Jonas
Jonas 2022 年 12 月 8 日
so whats the problem here?
someComplex=rand(5,1)+1i*rand(5,1)
someComplex =
0.6257 + 0.8031i 0.8168 + 0.6693i 0.8646 + 0.1120i 0.9827 + 0.4830i 0.4358 + 0.2156i
plot(someComplex,'x');
set(gca,'YScale','log');
xlabel('real part');
ylabel('imaginary part (i)')

サインインしてコメントする。

回答 (1 件)

Gobiha Duraisamy
Gobiha Duraisamy 2022 年 12 月 22 日
Currently, there is no direct function to plot one of the axis in log scale. As a workaround, you can set the appropriate scale to "log" as follows,
lamda = -rand(3,1)+1i*rand(3,1) % create three random set of eigenvalues
lamda =
-0.6889 + 0.2015i -0.9937 + 0.1999i -0.7680 + 0.2688i
plot(lamda,'o','LineWidth',3)
set(gca,'YScale','log')
grid on;
If you want to set the real part in log scale, use the following line of codes instead,
plot(lamda,'o','LineWidth',3)
set(gca,'XScale','log')
grid on;
Both X and Y coordinates are plotted in log scale using "loglog" function as follows,
loglog(lamda,'o','LineWidth',3)
grid on;

2 件のコメント

Jonas
Jonas 2023 年 1 月 21 日
"Currently, there is no direct function to plot one of the axis in log scale." thats not true, look into semilogx() and semilogy()
Siddhant Maurya
Siddhant Maurya 2023 年 1 月 31 日
It doesn't work. Try taking complex number in all 4 quadrants and then plot them.

サインインしてコメントする。

カテゴリ

質問済み:

2022 年 12 月 8 日

コメント済み:

2023 年 1 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by