How to smooth Data on App Designer for only plot on display
3 ビュー (過去 30 日間)
古いコメントを表示
Hello Everyone,
I'm trying to smooth some dataset on an app I'm creating on App Designer. The app imports several different datasets and I have made buttons to call up data and plot each separately in an axes I created although not simultaneosly. Now I want to add a slider underneath to smoothen any given dataset on display. Any advice on how to make a custom slider for this?
Thanks in advance.
0 件のコメント
回答 (1 件)
TADA
2021 年 7 月 27 日
You can save the original data in a different property, then plot it as response to the slider callback
See simple example I made that uses a button, slider and axes
the button randomizes some noisy data, and both button and slider callbacks call the doplot function which smoothes the original data according to the spinner value.
here moving average smoothing is applied and the smoothing span is controlled by the spinner value.
2 件のコメント
TADA
2021 年 7 月 27 日
I'm pretty sure smooth is part of the curve fitting toolbox, if you don't have access to that toolbox, you can look in the file exchange, someone surely implemented something...
Or you can pretty easily implement some simple smoothing filter yourself
As for multiple datasets, you can pretty easily implement the same thing, either by calling several methods from the callback hardcoded, or by calling a list of function handles in a loop, or save the datasets in a cellarray for instance and plotting using a loop or any number of other solutions. It's up to you
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!