problem using counter in a for loop
Ältere Kommentare anzeigen
I'm doing some practice problems for experience and can't get past an error with my counter with this function. What am I missing here?
Thanks in advance
function x = triangle(n)
i = 1;
for i:n-1
x(i) = i+x(i+1);
i = i+1
end
end
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 15 Okt. 2013
What is this?
x(i) = i+x(i+1);
x is unkown
1 Kommentar
Mary
am 16 Okt. 2013
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!