Potete dirmi come risolvere questo errore?
% --- Executes on button press in grain.
function grain_Callback(hObject, eventdata, handles)
% hObject handle to grain (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
X = handles.image;
B1 = handles.B1;
B2 = handles.B2;
B3 = handles.B3;
sigma = handles.sigma;
seed = handles.seed;
U(:,:,1) = grain(X, B1, sigma, seed);
U(:,:,2) = grain(X, B2, sigma, seed);
U(:,:,3) = grain(X, B3, sigma, seed);
Y = X+U;
axes(handles.box_immagine);
imshow(Y)
guidata(hObject, handles);
function [ U ] = grain( X, B , sigma, seed)
%GRAIN Summary of this function goes here
% Detailed explanation goes here
sigma = sigma/255;
randn('state', seed);
X(:,:,1) = randn(size(X(:,:,1))) * sigma;
X(:,:,2) = randn(size(X(:,:,2))) * sigma;
X(:,:,3) = randn(size(X(:,:,3))) * sigma;
U = conv2(X(:,:,1),B);
U = conv2(X(:,:,2),B);
U = conv2(X(:,:,3),B);
end