plot arc that pass through a particular point

I have attached my (x,y,z) coordinate values
And i plot these values using the below code
load XYZ
for i = 1 : size(XX,2)
plot3(XX(:,i),YY(:,i),ZZ(:,i)); hold on
end
grid on; hold off;
But if we zoom, we can see that, the arcs does not pass through the zero-coordinate
What can i do, to make all the arcs (or any arc i give) pass through the zero-coordinate?

 채택된 답변

Sergey Kasyanov
Sergey Kasyanov 2021년 6월 21일

1 개 추천

Hello!
The simplest way is:
figure; hold on;
for i = 1 : size(XX,2)
[~, n] = max(XX(:,i));
plot3(XX(:,i), YY(:,i) - YY(n,i), ZZ(:,i)- ZZ(n,i));
end

댓글 수: 7

Elysi Cochin
Elysi Cochin 2021년 6월 21일
편집: Elysi Cochin 2021년 6월 22일
@Sergey Kasyanov how can i view it in x,y,z coordinate using the above lines of code
Sergey Kasyanov
Sergey Kasyanov 2021년 6월 21일
편집: Sergey Kasyanov 2021년 6월 21일
Use 'rotate' instrument to rotate the view and look at the YZ-plane.
Are you run all code that I wrote?
Are you rotating the view?
Elysi Cochin
Elysi Cochin 2021년 6월 22일
편집: Elysi Cochin 2021년 6월 22일
Sir, when i rotate, it is visible
Is it OK?
Elysi Cochin
Elysi Cochin 2021년 6월 22일
편집: Elysi Cochin 2021년 6월 22일
Thank you Sir, now its working

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

2021년 6월 21일

편집:

2021년 6월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by