需要一点something new ,虽说PDF/CDF也不new,但还是先加着吧,我需要图的横坐标是非等间距的,例如下图
matlab的工具箱里自带工具(见下图红框),尝试了一下,出图的横坐标是等间距的,尝试更改,但是出了问题,所以还是算出来用origin画吧
代码以下
CDF:
c=[0.05 0.55 1.5 3.5 7.5 15 35 75];
N=hist(x,c);
cdf1=cumsum(N)/sum(N);
PDF:
c=[0.05 0.55 1.5 3.5 7.5 15 35 75];
[N,X]=hist(x,c);
N1=N./sum(N);
然后用origin画一下就行了。。
<script>
(function(){
function setArticleH(btnReadmore,posi){
var winH = $(window).height();
var articleBox = $("div.article_content");
var artH = articleBox.height();
if(artH > winH*posi){
articleBox.css({
'height':winH*posi+'px',
'overflow':'hidden'
})
btnReadmore.click(function(){
if(typeof window.localStorage === "object" && typeof window.csdn.anonymousUserLimit === "object"){
if(!window.csdn.anonymousUserLimit.judgment()){
window.csdn.anonymousUserLimit.Jumplogin();
return false;
}else if(!currentUserName){
window.csdn.anonymousUserLimit.updata();
}
}
articleBox.removeAttr("style");
$(this).parent().remove();
})
}else{
btnReadmore.parent().remove();
}
}
var btnReadmore = $("#btn-readmore");
if(btnReadmore.length>0){
if(currentUserName){
setArticleH(btnReadmore,3);
}else{
setArticleH(btnReadmore,1.2);
}
}
})()
</script>
</article>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39