필터 지우기
필터 지우기

double the number of coordinates of a vector while maintaining the trend of the line created with that coordinates

조회 수: 1 (최근 30일)
HI! Is there a way to double the number of coordinates while maintaining that trend?
load L
figure
plot3(L(:,1),L(:,2),L(:,3),'k.','Markersize',10);
axis equal

채택된 답변

Voss
Voss 2023년 9월 25일
load L
figure('Position',[200 10 400 1000])
plot3(L(:,1),L(:,2),L(:,3),'ko','Markersize',6);
axis equal
Nt = size(L,1);
t = 1:Nt;
t_new = linspace(1,Nt,2*Nt-1);
L_new = interp1(t,L,t_new);
hold on
plot3(L_new(:,1),L_new(:,2),L_new(:,3),'r.','Markersize',4);
legend({'original','interpolated'},'Location','NorthOutside')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by