In attached figure, one equation is there which i need to implement.
where,
x[n] = a* r^n a = 11; r = 0.9; L = 19; 0<=m<=L; 0<=n<=L
for this i have written a script.
clear all a = 11; r = 0.9; L = 19; for m = 0:L for n = 0:L S(m) = a*(r^n); end end plot(S,m) xlabel('Value of "S"'); ylabel('Value of "L"'); title('a = 11; r = 0.9; L = 19')
When i run it, it gives following error
Attempted to access (0); index must be a positive integer or logical. Error in Question_6 (line 8) S(m) = a*(r^n);
How to solve it..?
Best Answer