Query regarding Quiver plot

9 vues (au cours des 30 derniers jours)
Vijayakumar Pachigolla
Vijayakumar Pachigolla le 15 Juin 2022
Dear all,
I have data (distance, frequency, arrow amplitude and direction) at several stations along a profile. I want to make induction arrows pseudosection (Distance vs frequency and corresponding arrow behaviour). I used quiver command in matlab. Here, my y axis in log scale and x axis is normal. I am unable get arrows in a proper manner. Kindly guide me.
Thanking you
Vijay

Réponses (1)

KSSV
KSSV le 15 Juin 2022
Get the components first and then use quiver.
u = amplitude.*cos(direction) ; % be cautious of units of direction/ angle
v = amplitude.*sin(direction) ;
quiver(distance, frequency, u,v)
  1 commentaire
Vijayakumar Pachigolla
Vijayakumar Pachigolla le 15 Juin 2022
Dear KSSV,
Thank you for your quick response.
I have already used in the following way
u = AmpliR .* cos(thetaR);
v = AmpliR .* sin(thetaR);
quiver(repmat(x(p,1),length(freq1),1),1./freq1,u,v);
set(gca,'YScale','log');
set(gca,'Ydir','reverse');
ylim([0.001,1000])
set(gca,'YTick', [0.001,0.01,0.1,1,10^1,10^2,10^3,10^4,10^5]);
My frequency is in log scale. But, I am unable to get log scale. If I use 'Y scale' in log. the following error is coming.
Warning: Error updating Quiver.
DataSpace or ColorSpace transform method failed.
Kindly help me in this regard.
Thanking you
Vijay

Connectez-vous pour commenter.

Catégories

En savoir plus sur Vector Fields dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by