error in while loop

2 ビュー (過去 30 日間)
Tanvi
Tanvi 2014 年 12 月 12 日
回答済み: Ingrid 2014 年 12 月 12 日
hello... i am currently doing project on secured image compression using independent component analysis and artificial neural network.. and i am facing problem in while loop. the code inside while while loop is not executing. my code of while loop is : V=rand(3,3); v=V*z; I=[1,0,0;0,1,0;0,0,1]; epoch=0; con=0; while con % % % v=V1*z; V2=V+0.5*[I-(v*v')] v=V2*z; epoch=epoch+1; if epoch==10 con=1 end end

回答 (1 件)

Ingrid
Ingrid 2014 年 12 月 12 日
shouldn't it just be
while ~con
because now your while condition is never true so of course the code within your while loop will never be executed

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by