simple array calculation help
์ด์ ๋๊ธ ํ์
Write a program that will smooth an array of data using an exponential moving average. For the input data we assume a row vector with ๐ elements. We use the following expression for the average: Xavg,๐ = ๐ผX(๐v,๐โ1) + (1 โ ๐ผ) โ
X๐, except for ๐ = 1, where X๐vg,1 = X1. You can use the following statement (for MATLAB) to create a row vector of data with noise from a normal distribution with a mean of 5.0 and a standard deviation of 3.0 to test your program:
1) inputData = 5.0 + 3.0 โ ๐andn(1,100);
2) ๐ผ= 0.8
Please use only basic operators like assignment, comparison, conditional statement, and loops. Do not use built in functions or advanced possibilities of a specific programming language (e.g. vectorization in MATLAB).
๋ต๋ณ (1๊ฐ)
Cris LaPierre
2021๋
4์ 23์ผ
0 ๊ฐ ์ถ์ฒ
I suggest going through MATLAB Onramp
์นดํ ๊ณ ๋ฆฌ
๋์๋ง ์ผํฐ ๋ฐ File Exchange์์ Multidimensional Arrays์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!