how can we decreases the length of the quiver? so that the tail get smaller but head shouldn't move.

1 回表示 (過去 30 日間)
X1 = [0.00246236309072327 0.00222132983511081 0.00176285733832268 0.00113182408271022 0.000390000000000000 -0.000389999999999999 -0.00113182408271022 -0.00176285733832268 -0.00222132983511081 -0.00246236309072327 -0.00246236309072327 -0.00222132983511081 -0.00176285733832268 -0.00113182408271022 -0.000390000000000000 0.000389999999999999 0.00113182408271022 0.00176285733832268 0.00222132983511081 0.00246236309072327];
Y1 = [0.000390000000000000 0.00113182408271022 0.00176285733832268 0.00222132983511081 0.00246236309072327 0.00246236309072327 0.00222132983511081 0.00176285733832268 0.00113182408271022 0.000390000000000000 -0.000389999999999999 -0.00113182408271022 -0.00176285733832268 -0.00222132983511081 -0.00246236309072327 -0.00246236309072327 -0.00222132983511081 -0.00176285733832268 -0.00113182408271022 -0.000390000000000000];
quiver(X1(1,1),Y1(1,1))
axis equal
for j = 2:20
hold on
quiver(X1(1,j),Y1(1,j))
hold off
end

回答 (1 件)

Askic V
Askic V 2023 年 1 月 27 日
I would do with a different approcah to have more fexibility and control over how vectors would look like.
Here is a sample code:
clear
clc
close all
xc = 1; % x center coordinate
yc = 1; % y center coordinate
r = 0.2; % radius
angles = linspace(0, 360, 10);
x = r*cosd(angles)+xc;
y = r*sind(angles)+yc;
figure
hold on;
for i = 1: numel(x)
quiver(xc,yc, x(i)-xc,y(i)-yc,'off');
end

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by