how to plot 50 percentile?
3 views (last 30 days)
Show older comments
filename = 'Book11.csv';
M = readtable(filename);
disp(M)
h=M{:} %i have to select all data for phi from 120 240 only and plot 50 percentile
a=M{:,3}
b=90;
f=unique(M(:,1)); %freq
rcs=r{:,4};
r = rcs(find(a >=120 & a <= 240))
size(r)
t=prctile(r,50)
plot(a,t,'k'); hold on; grid on
plot(a,t,'r')
legend('original','average')
0 Comments
Answers (1)
Voss
on 6 Mar 2024
filename = 'Book11.csv';
M = readtable(filename);
disp(M)
a=M{:,3};
rcs=M{:,4};
idx = a >=120 & a <= 240;
p = a(idx);
r = rcs(idx);
t=prctile(r,50)
plot(a,rcs,'.k'); hold on; grid on
plot(p,r,'gs')
plot([120 240],[t t],'r')
legend('all','120<=phi<=240','median')
0 Comments
See Also
Categories
Find more on Descriptive Statistics and Visualization 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!