why is the figure dioriented?

3 ビュー (過去 30 日間)
shamma aljaberi
shamma aljaberi 2023 年 11 月 1 日
コメント済み: Dyuman Joshi 2023 年 11 月 1 日
Hi im trying to plot the imaginary and real parts of the array, but the figure seems dioriented.
here is the code:
clear all
clc
% known values:
r1=5; r2=1; r3=5; r4=7; AP=5; s=0.873;
thata2=0:0.0314:6.283185;
for i=1:length(thata2)
z(i)=r1-(r2*exp((thata2(i))*1i));
%find thata 3:
a(i)=(conj(z(i))).*r4;
b(i)=(z(i)).*conj(z(i))+(r4)^2 -(r3)^2;
c(i)=(z(i)).*r4;
T3(i)=(-b(i)+sqrt((b(i)).^2-(4.*(a(i)).*(c(i)))))/(2.*(a(i)));
T3n(i)=(-b(i)-sqrt((b(i)).^2-(4.*(a(i)).*(c(i)))))/(2.*(a(i)));
angle3(i)=angle(T3(i));
%%find thata 4:
T4(i)=(z(i)+(r4.*T3(i)))/r3;
T4n(i)=(z(i)+(r4.*T3n(i)))/r3;
angle4(i)=angle(T4(i));
%find position analysis for point AP:
A(i)=angle3(i)-s;
RA(i)=r2.*exp((thata2(i))*1i);
RAP(i)=(r2.*exp((thata2(i)).*1i))+(AP.*exp(((A(i))).*1i));
end
figure
plot(real(RA),imag(RA))
hold on
plot(real(RAP),imag(RAP));
hold off
title('paths of points A and P')
xlabel('real part')
ylabel('imaginary part')
figure
plot(thata2,angle3)
hold on
plot(thata2,angle4)
hold off
title('thata 3 and thata 4 Vs thata 2')
xlabel('thata 2')
ylabel('thata 3 & thata 4')
grid on
legend('thata3','thata 4')
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 11 月 1 日
"but the figure seems dioriented."
What does disoriented mean in this context?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by