I have two series of data(both of type double). I want to generate a kernel density plot from these. Pls help. My coding is given below.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% curs1 = exec(conn, 'select sp_x, sp_y from road_part6_trajectories_oneway2_new_segments_cartesian2'); format long; curs1 = fetch(curs1); AA = curs1.Data; x = [AA{:,1}]'; y = [AA{:,2}]'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I want to generate the kernel density or any other suitable density plot for x and y. pls advise.
% Generate some normally distributed data x = randn(50,1); y = randn(50,1); % Estimate a continuous pdf from the discrete data [pdfx xi]= ksdensity(x); [pdfy yi]= ksdensity(y); % Create 2-d grid of coordinates and function values, suitable for 3-d plotting [xxi,yyi] = meshgrid(xi,yi); [pdfxx,pdfyy] = meshgrid(pdfx,pdfy); % Calculate combined pdf, under assumption of independence pdfxy = pdfxx.*pdfyy; % Plot the results mesh(xxi,yyi,pdfxy) set(gca,'XLim',[min(xi) max(xi)]) set(gca,'YLim',[min(yi) max(yi)])
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.