필터 지우기
필터 지우기

How to bin x y graph

조회 수: 2 (최근 30일)
Parag
Parag 2015년 9월 2일
댓글: Image Analyst 2015년 10월 21일
Hi guys
I have a x, y graph,as shown in picture. I want to combined it to one single curve. Can you please let me know how to do that. I tried using binning but my x and y values are dependent means when I plot only y data it looks different. I will appreciate your help. Thank you
  댓글 수: 1
dpb
dpb 2015년 9월 2일
Which toolbox(es) do you have available or base Matlab only? What is the intended end use of the smoothed/single curve?

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2015년 10월 19일
Combine all the arrays into single x and y arrays, then you can sort the data based on the x values, then use sgolayfilt() in the Signal Processing Toolbox. I've attached an example.
  댓글 수: 3
Parag
Parag 2015년 10월 21일
I need help with the question posted on below link. I will appreciate if could let me know methode to do planer fit that will be a grate help. At this point I don't have any idea about 2D planer fit. Question is here in this link http://www.mathworks.com/matlabcentral/answers/249190-help-with-2d-planer-fit
Image Analyst
Image Analyst 2015년 10월 21일
It's not the way I would have done it, though it may work. Using the histogram basically gives you quantized data, which is coarser than your original sampling. You use 5000 bins to try to have it be less quantized but with that many bins, you may have many bins with just one value in them, unless you have hundreds or millions of values. So the final mean curve may look kind of noisy. With sgolayfilt() you don't have those problems. First I'd pass the data into interp1() to get uniformly sampled data, then I'd call sgolayfilt() - it's like 2 lines of code.
For fitting a plane, I'd recommend polyfitn() by John D'Errico http://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn Attached is an example.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Curve Fitting Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by