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 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!