error: invalid range ; What could be the reason for the invalid error in the code I wrote? If the reason is inf, will they explain ?

6 views (last 30 days)
function[S]=yanit6(x,N)
T1=0;
for n=1:inf
C=1;
for o=1:inf
T2=0;
for m=1:inf
end
T2=T2+o^m*N*x^k;
end
C=C*T2;
end
T1=TI+C
S=T1;
end

Answers (1)

madhan ravi
madhan ravi on 1 Jun 2020
Edited: madhan ravi on 1 Jun 2020
Replace inf with a very large finite number for instance 1e6 .
Note: You haven't defined K.
The reason is simple , imagine you just had a good meal , will you be able to eat just after that meal ? No ;)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!