Angles to arrow representation

6 Ansichten (letzte 30 Tage)
Kalyan Samala
Kalyan Samala am 19 Nov. 2020
Kommentiert: KSSV am 19 Nov. 2020
I have attached an Excel sheet which includes angles ranging from 0-90 degrees. I want the arrow representation for those values.
Thank you.
  1 Kommentar
KSSV
KSSV am 19 Nov. 2020
You need to have radius along with theta. Than you can use quiver to plot the arrows.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 19 Nov. 2020
data=xlsread('New Microsoft Excel Worksheet.xlsx');
l=0.5; % Length of the arrow
for i=1:6
for j=1:6
angle=data(i,j);
u=l*cos(angle); % convert polar (theta,r) to cartesian
v=l* sin(angle);
quiver(i,j,u,v,'linewidth',1.5);
hold on;
end
end
grid on;
May be other smart ways also to do the same

Weitere Antworten (0)

Kategorien

Mehr zu Vector Fields 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!

Translated by