function [h_y,h_x]=marg_new(joint_h) h_y=sum(joint_h); h_x=sum(joint_h');