Problem in using smooth function in App Designer

1 回表示 (過去 30 日間)
Mojtaba
Mojtaba 2024 年 9 月 8 日
コメント済み: Gojo 2024 年 9 月 11 日
Hello guys,
I have a problem with MATLAB App Designer. I've written a code that smooths data using 'Smooth response data' in the main MATLAB software. However, when I use it in App Designer, App Designer recognizes the smooth function as 'Backward recursion of diffuse state-space models'. I don't know how to solve this problem.
I would be very thankful if you could help me.
  2 件のコメント
Walter Roberson
Walter Roberson 2024 年 9 月 8 日
Note that code generation is not supported for smooth()
Mojtaba
Mojtaba 2024 年 9 月 9 日
So how can I smooth my data in it?

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

回答 (1 件)

Gojo
Gojo 2024 年 9 月 8 日
編集済み: Gojo 2024 年 9 月 8 日
Hey Mojtaba
It appears that the "smooth" function you were using is being overshadowed by another function with the same name. Since the function you intend to use would be a basic function, you can easily find alternatives for it.
  1. You could use the "smoothdata" function to achieve the same functionality. You can refer to the following documentation: https://www.mathworks.com/help/matlab/ref/smoothdata.html
  2. You can also find several implementations of the "smooth" function over the File Exchange Submissions. Check out the following submission for smoothing 1D data: https://www.mathworks.com/matlabcentral/fileexchange/66099-smoothing-1d-data-by-moving-different-filter-shapes?s_tid=srchtitle
  3. For adding a custom implementation of data smoothing, please have a look at the following documentation: https://in.mathworks.com/help/matlab/data_analysis/data-smoothing-and-outlier-detection.html?s_tid=answers_rc2-1_p4_MLT
I hope this helps!
  2 件のコメント
Mojtaba
Mojtaba 2024 年 9 月 9 日
Thank you so much for your help. I tried to use smoothdata() but did not work correctly for me.
Gojo
Gojo 2024 年 9 月 11 日
What issue were you facing with smoothdata() ?
The smooth() function can be easily implemented by a moving average filter and there would be various implementations available to choose from FEX submissions. If not, could you share the exact issue you are facing? Maybe you could attach a part of your code so that I could reproduce it at my end.

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

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by