generate y(n)=y(n-1)+x(n)
์กฐํ ์: 167(์ต๊ทผ 30์ผ)
ํ์ ์ด์ ๋๊ธ
hello i want to generate y(n)=y(n-1)+x(n). by using a for loop I can find the last value of y, but i need to store all values of y from n =1 till n. Who do I do that?
๋๊ธ ์: 0
์ฑํ๋ ๋ต๋ณ
Azzi Abdelmalek
2017๋
4์ 20์ผ
n=10
y0=0; % Initial conditions
y(1)=y0+x(1);
for k=2:n
y(k)=y(k-1)+x(k)
end
์ถ๊ฐ ๋ต๋ณ(2๊ฐ)
Roger Stafford
2017๋
4์ 20์ผ
That is precisely what the matlab โcumsumโ function does:
y = cumsum(x);
๋๊ธ ์: 1
polat kayhan
2021๋
5์ 24์ผ
๐๐+1 = ๐๐ 2 + 0.25
Information about its relation, calculate the value of its relation for a value of n, register
Write a computer program whose result will be output for n = 0, 5, 10, 15,โฆ communication only.
n = 0,1,2,3,โฆ., 54
๋๊ธ ์: 0
์ฐธ๊ณ ํญ๋ชฉ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!