Borrar filtros
Borrar filtros

why is the figure dioriented?

1 visualización (últimos 30 días)
shamma aljaberi
shamma aljaberi el 1 de Nov. de 2023
Comentada: Dyuman Joshi el 1 de Nov. de 2023
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 comentario
Dyuman Joshi
Dyuman Joshi el 1 de Nov. de 2023
"but the figure seems dioriented."
What does disoriented mean in this context?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by