What does %#ok<SAGROW> comment mean in MATLAB? -


i've encountered many matlab codes have %#ok<sagrow> comments. comment used in different circumstances , can't figure out means.

as example:

i = 1;  flag = true; l = 1:k     while(flag==true)         if(probs(i)~=0)             leaves(l).val = i-1; %#ok<*sagrow>             leaves(l).zero = '';             leaves(l).one = '';             leaves(l).prob = probs(i);             = + 1;              flag = false;         else             = i+1;             flag = true;         end     end flag =true; end 

there other references comment too, instace:

it suppresses mlint warnings. in specific case, not pre-allocating array.

mlint 1 of static code analysis tools matlab has. finds possible errors , shows warnings.

edit(1): i've noticed question sagrow, not agrow. not find it. guess is old/new mlint syntax.


Comments

  1. Are you failing to structure your assignment? Avail of electronics engineering assignment help from us. Our experts will format your paper perfectly. They will follow all the formatting related guidelines provided by your university or department.

    ReplyDelete

Post a Comment

Popular posts from this blog

css - Text drops down with smaller window -

php - Boolean search on database with 5 million rows, very slow -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -