HI everyone i have 2 cocentric circle which are of radius 1.5 and rafius 2 . i just want to be able to display the radius on to the plot once simulated . How do i do dat ?
Thank you
Best Answer
I am not quite certain what you want.
The Code —
t = linspace(0, 2*pi);
r = [1.5; 2]; % Radius
ctr = [0.5; 0.2]; % Circle Center
x = [r*cos(t) + ctr(1)]';
y = [r*sin(t) + ctr(2)]';
figure
plot(x, y)
hold on
plot([1 1]*ctr(1), [1 1]*ctr(2),'+r') % Plot Center
I don't thinkquiver has any built-in labeling capabilities, but you could manually add text to any location(s) withtext(x,y,'text string'). Here's an example with several text labels:
Best Answer