how rotate a number as an vector in quiver plot?
1 view (last 30 days)
Show older comments
Hi all, I am having a very strange issue with rotating vector along the circle that I cannot seem to debug - I am hoping fresh eyes will help. The problem is best described if I explain it as follows:
r=1; % radius of nodes in cm
n=9; % number of (equally spaced) nodes around the half-circumference
theta=-pi/2:pi/(n-1):+pi/2;% angular position from 12 o'clock
x=r*sin(theta)';
y=r*cos(theta)';
%%Type in modal matrix (i.e. mode shapes are columns)
% Dummy data for you to replace
w=[4.03,-2.75;4.8,-1.17;4.41,-1.5;4.29,-2.42;
3.86,-2.88;3.53,1.31;3.39,1.3;
3.29,1.46;4.56,1.7];
% Set in-plane components of motion to zero since they are unmeasured
u=zeros(size(w));
v=zeros(size(w));
% Type in the natural frequencies here
fn=[171,245];
for ii=1:length(fn)
figure(ii)
quiver(y,x,v(:,ii),w(:,ii))
hold on
plot(y,x,'-r','Linewidth',3) % overlay geometry
title(['Mode shape of ', num2str(fn(ii)),' Hz mode'])
xlabel('x (cm)')
ylabel('y (cm)')
end
I want the vector be on the circumference of the circle but has an direction that likes passing from the centre of the circle instead of being perpendicular at each point to the circumference of the circle.
3 Comments
Answers (0)
See Also
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!