why is the figure dioriented?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Dyuman Joshi
am 1 Nov. 2023
"but the figure seems dioriented."
What does disoriented mean in this context?
Also, is this question related to https://in.mathworks.com/matlabcentral/answers/2041621-why-does-it-not-plot-the-function?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance 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!