Connect all dots I polarplot

3 views (last 30 days)
Kalle
Kalle on 17 Apr 2023
Commented: Kalle on 17 Apr 2023
Hello, I would like to connect the last item with the first one, so I get a “circle”. I know how to connect the dots at the polarscatter but how do I connect the last dot with the first one without changing the vector s?
clc;
clear all;
r=[10:36:360]
r = r/360*2*pi
s=[5,3.5,5,4,4,3.5,4,4.2,4.7,4]
polarplot(r,s,'-x')

Answers (1)

Alan Stevens
Alan Stevens on 17 Apr 2023
Like this?
r=[10:36:360 10];
r = r/360*2*pi;
s=[5,3.5,5,4,4,3.5,4,4.2,4.7,4, 5];
polarplot(r,s,'-x')
  3 Comments
Kalle
Kalle on 17 Apr 2023
that should work. thx

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!