MATLAB Coder Error : Output argument 'b' is not assigned on some execution paths? Help!
Afficher commentaires plus anciens
Hello guys! I am trying to convert the following code into C using MATLAB Coder and keep getting the same error which makes no sense to me because the code works fine on MATLAB.It keeps telling me 'Output argument 'b' is not assigned on some execution paths'.. What does it mean? Here's my code:-
function [ b ] = dct2C( M,N )
a = [1 2 3 4; 2 3 4 5; 3 4 5 6; 4 5 6 7];
c = [1 2; 3 4]
q_mtx = [16 11; 12 12];
for x = 1:2:M
for y = 1:2:N
b = a(x:x+1, y:y+1);
b = c*b*c';
b = b./q_mtx ;
a(x:x+1, y:y+1) = b;
end
end
end
2 commentaires
Geoff Hayes
le 1 Mar 2015
Hiroshi - why do you the following assignment
a(x:x+1, y:y+1) = b;
but then don't return a?
Hiroshi Nakamura
le 2 Mar 2015
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!