how can i prevent bogus values while executing a loop consist of variables?
Ältere Kommentare anzeigen
sir, In my program there is a loop having both starting and ending values are variable which is called earlier in the program.when executing i got bogus value as result.but when i give the values of the variables directly just before the loop i got correct result.why this happens?how can i solve this? concerned loop in my program is attached here..n my problem is the result obtained as "sumB"..in that the variables "g" and "h" was obtained earlier
Antworten (1)
Thorsten
am 5 Nov. 2015
0 Stimmen
Have you checked the value of sumB before the loop? Maybe you assume sumB to be 0 but it is not from a previous run of the loop.
Kategorien
Mehr zu Loops and Conditional Statements 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!