Output argument not assigned during call
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kiruba Raji.I
le 23 Juil 2016
Réponse apportée : Geoff Hayes
le 23 Juil 2016
function [S1]= PCNN(S)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
Alpha_F=0.1;
Alpha_L=1.0;
Alpha_T=1.0;
V_F=0.5;
V_L=0.2;
V_T=20.0;
Beta=0.1;
Num=100;
W=[0.5 1 0.5;1 0 1; 0.5 1 0.5];
M=[0.5 1 0.5;1 0 1; 0.5 1 0.5];
F=zeros(size(S));
L=F;
Y=F;
U=F;
T=ones(size(S));
S=im2double(S);
for n=1:Num
F=exp(-Alpha_F)*F + V_F * conv2(Y,W,'same')+S;
L=exp(-Alpha_L)* L+V_L * conv2(Y,M,'same');
U=F.*(1+Beta* L);
Y=double(U>T);
T=exp(-Alpha_T)*T+V_T*Y;
end
end
Script
I=imread('d:\segleaf\i1.jpg');
[I1]=PCNN(I);
0 commentaires
Réponse acceptée
Geoff Hayes
le 23 Juil 2016
Kiruba - look at your function signature
function [S1]= PCNN(S)
The output parameter is S1 yet nowhere in your code is this variable declared. You will need to determine which of the variable in your for loop corresponds to S1 and initialize S1 to this variable.
0 commentaires
Plus de réponses (1)
the cyclist
le 23 Juil 2016
The output variable S1 is never assigned in the function.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!