MATLAB Answers

how can I plot 800 samples in a percentage cicle from 0 to 100% on x axis?

13 views (last 30 days)
sara notarnicola
sara notarnicola on 23 Sep 2020
Edited: Adam Danz on 24 Sep 2020 at 17:24

  5 Comments

Show 2 older comments
sara notarnicola
sara notarnicola on 23 Sep 2020 at 12:32
I have plot a column vector of 770 values and I want to express x axis in a cicle from 0 to 100,like this .
Vasishta Bhargava
Vasishta Bhargava on 23 Sep 2020 at 23:57
%if true
% code
% end
S = 0:770; % change it acc to length of y data
Sp = S/770; % x data
Y = [...];% y data
plot(Sp*100,Y);
Adam Danz
Adam Danz on 24 Sep 2020 at 1:41
The x axis in the image you shared is far from circular (see polaraxes). The x axis is linear from 0 to 100.
I'm lost.

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 24 Sep 2020 at 1:44
Edited: Adam Danz on 24 Sep 2020 at 17:24
If you wanted to normalize the X values (Sp) so that they span from 0 to 100,
SpNorm = (Sp-min(Sp))./range(Sp)*100;
plot(SpNorm, Y)

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by