How to set color in quiver 2D

2 views (last 30 days)
Ale
Ale on 16 Nov 2016
Commented: he on 22 Sep 2022
Hi, I've trying to assigning color to the arrows according to the vector magnitude. I used set, but I guess to use a set, I need the specify which is the magnitude of the arrows, but I don't know how...
I tried used functions like quiverwcolorbar, but there's NaN in the data, so it doesn't work for some of them.

Accepted Answer

KSSV
KSSV on 16 Nov 2016
  2 Comments
Ale
Ale on 18 Nov 2016
Yes I have. I tried with quiverc2wcmap 'cause I have NaNs in the data, but its returns a message error : Subscript indices must either be real positive integers or logicals...
KSSV
KSSV on 18 Nov 2016
Edited: KSSV on 18 Nov 2016
You remove NaN's and send only numbers then. Simple.
And I have checked with quiverc, it is working though there are NaN's. Have you tried the above link? It is quiverc not quiverc2wcmap.

Sign in to comment.

More Answers (1)

he
he on 22 Sep 2022
I have the same problem for quiver 2D.

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!