simulink error Variable 'img_r' is not fully defined on some execution paths.
Mostrar comentarios más antiguos
function y = fcn(u,img1,img2, data)
Ne = u; L = img1; re = img2;
for n=1:Ne [r,c] = find(L==n); % Extract letter n1=re(min(r):max(r),min(c):max(c)); % Resize letter (same size of template) img_r=imresize(n1,[42 24]); end y = img_r;
why y is error?
Respuestas (2)
tsai kai shung
el 18 de Oct. de 2017
0 votos
tsai kai shung
el 18 de Oct. de 2017
1 comentario
Rik
el 18 de Oct. de 2017
You should answer in comments, not in answers. The answer section is for solutions to the problem, not for responses to clarification.
You should rethink what you want to do. This code seems to overwrite the result on every iteration. The error you are getting is strange, except if Ne is allowed to be 0.
Categorías
Más información sobre 变量 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!