n = [1:1:10]; % X m = [1:1:3]; % Y z1 = rand(1,20); z2 = rand(1,20); zr1 = reshape(z1,1,1,[]); % Z zr2 = reshape(z2,1,1,[]); % Z F1 = meshgrid(n,m).*zr1; %XYZ F2 = meshgrid(n,m).*zr2; %XYZ C = jet(length(n)) for en = 1:length(n) for pll = 1:length(m) scatter(reshape(F1(pll,en,:),1,[]),reshape(F2(pll,en,:),1,[]),[],C(en,:)); % ? scatterhist hold on end end hold off
scatterhist() uses different syntax than scatter(). It seems like you need to enter all the data at once, as vectors, and then use a grouping variable. Try this:
groups = repelem(1:numel(n), numel(z1)*numel(m)); scatterhist(reshape(permute(F1,[3 1 2]),[],1), reshape(permute(F2,[3 1 2]),[],1),... 'Group', groups(:),... 'Color', C);
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.