フィルターのクリア

how to perform one plot

4 ビュー (過去 30 日間)
Stefano
Stefano 2014 年 7 月 30 日
コメント済み: Star Strider 2014 年 7 月 30 日
Hi, I am waiting for to optimize the plot of some arrays I attached my figure to showing you my problem: I would to obtain a "cleaned" curve. I tried with the following code but it is not the solution:
my_datax = min(x):10:max(x)
my_datay = min(y):10:max(y)
neither with others steps
Do you have any suggestions? Thank you
  2 件のコメント
Ahmet Cecen
Ahmet Cecen 2014 年 7 月 30 日
What exactly do you mean when you say "cleaned"? Explain very explicitly what you would like to see as the end result.
Stefano
Stefano 2014 年 7 月 30 日
I would to see a light line such as the last section

サインインしてコメントする。

回答 (2 件)

Star Strider
Star Strider 2014 年 7 月 30 日
It looks as though you are plotting:
plot(my_datax, my_datay, '-*')
Change the plot to:
plot(my_datax, my_datay, '-')
to plot the line without the markers.
  9 件のコメント
Image Analyst
Image Analyst 2014 年 7 月 30 日
See my attached demo of polyfit and I think you'll easily be able to see how you can adapt it to your data.
Star Strider
Star Strider 2014 年 7 月 30 日
Stefano — If you know the model, I can help you do the nonlinear parameter estimation to characterise your data. That is easiest if you have the Statistics Toolbox or the Optimization Toolbox, but is only slightly more difficult using fminsearch. If you post your model and attach at least one of your data sets (so I can test my code), we can work together on coding it and then doing the parameter estimation. You will probably have to explain the model to me if it is not in an area of my expertise, but unless it is an extremely complicated model, coding and estimating it should not be difficult.
IA — Thank you. That seems to be a well-received demo.

サインインしてコメントする。


Joseph Cheng
Joseph Cheng 2014 年 7 月 30 日
編集済み: Joseph Cheng 2014 年 7 月 30 日
Depending on what you're trying to display (no labeled axes) perhaps using sort() or sortrows() to order the data in relation to x-axis data. This way there shouldn't be any back tracing in the plot.
Additionally sorting should help if you're looking at the "double" curve line for the cyan. After sorting you should be able to pick the max point of a rolling window. Sort of how a convolution would scan across the data and take the average but instead take the maximum/minimum/median/etc to get the desired curve. If these points under the curve occur at the same points that are above them you could also filter them out by finding the repeated x-axis points and use the maximum y values for the repeated points.

カテゴリ

Help Center および File ExchangeFit Postprocessing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by