evalfis error
古いコメントを表示
hi.. the fuzzy inference system 'a' takes 3 inputs. function RGB2Lab is already defined. the following is the code in which the FIS has to evaluate the l,a,b values of the image.
z=imread('Lenna.png');
x=readfis('a.fis');
s=imresize(z,[128 128]);
R=s(:,:,1);
G=s(:,:,2);
B=s(:,:,3);
[L,a,b]=RGB2Lab(R,G,B);
[m,n]=size(s);
Ld=double(L);
ad=double(a);
bd=double(b);
for i=1:m
for j=1:n
q=evalfis([Ld ad bd],x);
end
end
the error shown is: Error using ==> evalfis The first argument should have as many columns as input variables and as many rows as independent sets of input values.
Error in ==> ch at 22 q=evalfis([Ld ad bd],x);
can anyone please help me correct it..
採用された回答
その他の回答 (1 件)
mideas
2012 年 4 月 4 日
5 件のコメント
mideas
2012 年 4 月 4 日
Walter Roberson
2012 年 4 月 4 日
for i=1:m
for j=1:n
q(m,n)=evalfis([Ld(m,n) ad(m,n) bd(m,n)],x);
end
end
mideas
2012 年 4 月 4 日
Walter Roberson
2012 年 4 月 4 日
After posting I realized I wasn't sure that this was correct. I would need to look further at fis models. Unfortunately that is not something I will have time to do today.
mideas
2012 年 4 月 5 日
カテゴリ
ヘルプ センター および File Exchange で Fuzzy Logic in Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!