fcontour and fplot showing distorted images...
1 回表示 (過去 30 日間)
古いコメントを表示
I can still use ezplot and ezcontour just fine. But fplot and fcontour has distorted images that makes the plot unreadable. Here is a comparison from a code I wrote.
1)fplot

2)ezplot

3)fcontour

4)ezcontour

In case you are curious here is the code
clear all
clc
syms k a b x
e=exp(sym(1));
assume (a>0);
%a=6;
z(k,a)=(((e^(2*i*k*a))-1)/(2*i*k*((pi*a)^(1/2))*(e^(i*k*a))))
%fplot(z);
%ezplot(z);
ezcontour (z);
%fcontour(z);
0 件のコメント
採用された回答
Star Strider
2022 年 1 月 8 日
Separate the real and imag parts of the function and it works —
syms k a b x
e=exp(sym(1));
assume (a>0);
%a=6;
z(k,a)=(((e^(2*i*k*a))-1)/(2*i*k*((pi*a)^(1/2))*(e^(i*k*a))))
figure
%fplot(z);
%ezplot(z);
% ezcontour (z);
fcr = fcontour(real(z),'-r');
% get(fcr)
hold on
fci = fcontour(imag(z), '-b');
hold off
grid on
% legend('\Re{z}','\Im{z}', 'Location','bestoutside')
.
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!