Add two hist3?
이전 댓글 표시
I have two hist3 figure as:
Ctr = {1.5:0.5:4.5 0.1:0.1:0.9};
hist3([[1;2.7; 3.6], [0.25;.36;.84]],'Ctrs',Ctr);

hist3([[1.2;1.7; 2.6], [0.17;.46;.94]],'Ctrs',Ctr);

I want two have the addition of these two histograms, how is it possible?
댓글 수: 8
dpb
2018년 9월 7일
By "addition" you mean
A=[[1;2.7; 3.6], [0.25;.36;.84]];
B=[[1;2.7; 3.6], [0.25;.36;.84]];
>> figure
>> hist3([A;B],'Ctrs',Ctr);

?
Seyyed Mohammad Saeed Damadi
2018년 9월 8일
jonas
2018년 9월 8일
"I want two have the addition of these two histograms, how is it possible?"
The problem statement is ambiguous. Take some time to clarify.
dpb
2018년 9월 8일
I haven't "changed" anything -- I took a guess as to what the problem actually might be; I "noticed" the Q?; what I didn't notice was anything that actually described what was meant.
Seyyed Mohammad Saeed Damadi
2018년 9월 8일
jonas
2018년 9월 8일
Sorry if I still don't understand but perhaps this is related to your older question that I replied to about an hour ago?
Basically, my take on this is the following. You have two iterations over some range of x-data, say
x1=[1;2;3;4]
x2=[1;2;3;4]
and
y1=[1;2;3;4]
y2=[2;2;3;3]
If you want to show both iterations in the same hist3 plot, then you need to concatenate the data:
yt = [y1;y2]
xt = [x1;x2]
hist3([xt,yt])
I believe this is exactly what dsp said, so perhaps this is not what you want?
Seyyed Mohammad Saeed Damadi
2018년 9월 8일
jonas
2018년 9월 8일
My pleasure, happy to help!
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Transforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!