What fuction can I use for represente time as an angle?
5 views (last 30 days)
Hi! Brefly, I have some latencies of neurons that i want to represent in a circular plot, the total circle representes an interval of 300ms an the latencies goes from the origin to the correspond angle as a clockwise.
For example if 300ms is 360° then 150ms will be an angle of 180°, like:
latencies= [50; 240; 151; 122; 170];
angles=[60; 288; 181.2; 146.4; 204];
I think compass is the more accurate to what i want to do, but in the example i really dont get how the "v" varible works when I see the graph in my case "u" will be the same number because i dont want to put another magnitud for now
u = [5 3 -4 -3 5];
v = [1 5 3 -2 -6];
Do you have some suggestion?
Jonas on 8 Jun 2021
Edited: Jonas on 8 Jun 2021
first thing: you can calculate all your angles directly using the formula in your for loop:
to your question: the compass function wants x and y coordinates of your points to which the arrows are pointing, you can get them using the cos() and the sin() on the angles (dont forget comversion from degree to rad)
angles=[45 0 180 70];
edit: instead of conversion you can use the cosd() and sind() function which takes the inputs as degrees instead of rad