MATLAB 折线变曲线问题用cdf画图方法画了两条线 ,怎么把折线变成曲线?a=[1 6/7

MATLAB 折线变曲线问题
用cdf画图方法画了两条线 ,怎么把折线变成曲线?
a=[1 6/7 13/22 0 0 38/55 1 42/61 7/9 15/23 26/33 39/62 0 4/5 1 18/25]
cdfplot(a)
hold on
b=[0 1 1 0 0 54/55 1 59/61 1 43/46 32/33 123/124 0 1 0 1]
cdfplot(b)
怎样改成曲线?
xujm1 1年前 已收到1个回答 举报

zclin10 幼苗

共回答了22个问题采纳率:81.8% 举报

a=[1 6/7 13/22 0 0 38/55 1 42/61 7/9 15/23 26/33 39/62 0 4/5 1 18/25];cdfplot(a);hold on[f,x] = ecdf(a);x1=[x(1:3)];y1=[f(1:3)];plot(x1,y1,'r-')hold onx2=[x(3:13)],y2=[f(3:13)]p=polyfit(x2,y2,5)xi=0.59:0.01:1;yi=polyval(p,xi)plot(xi,yi,'r*')

1年前 追问

10

xujm1 举报

请问 为什么在3的位置拆分 而不是其他的位置呢??

举报 zclin10

因x在0~0.59范围内只有二组数据,与后面的不好连。所以在0~0.59范围内近似为一条直线。
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 0.016 s. - webmaster@yulucn.com