function setRedComponent(Image,val)
Image(:,:,1)=val;
inname = inputname(1);
if ~isempty(inname)
assignin('caller', inname, Image);
end
end
This style of coding is not recommended at all!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!