Error in this code
Show older comments
Hi,
Can somebody help me to fix the error in the code that is located in this page:
the code is the math code of this paper : J. Abonyi and F. Szeifert, Supervised fuzzy clustering for the identification of fuzzy classifiers, Pattern Recognition Letters, 24(14) 2195-2207, October 2003 (MATLAB implementation), New!!
Unfortunately, the author does not reply to me questions.
The error occurs when I run Winclust. The error is as follow: ??? Error using ==> times Matrix dimensions must agree.
Error in ==> sGGclust at 93 J(iter) = sum(sum(f0.*d));
Error in ==> Wineclust at 49 [F,C,P,Pi,M,py] = sGGclust([data(cindex,feat) data(cindex,end)],F,2,1e-6,IDA,s);
I would appreciate any help.
Thanks,
Ladan
Answers (1)
the cyclist
on 4 Feb 2012
0 votes
The best way to figure out this error is to use the debugging commands supplied with MATLAB. If you click just next to the line number (e.g. on line 93 of sGGclust), you will create a breakpoint there, and MATLAB will halt before executing that line. Then, you can hover over the variable names in the file (such as f0 and d) and see why their dimensions do not match.
You can find more details in the MATLAB User Guide in the section "Editing and Debugging MATLAB Code"
7 Comments
ll kk
on 4 Feb 2012
ll kk
on 4 Feb 2012
Image Analyst
on 5 Feb 2012
OK, that's fine . . . but there are reasons no one can answer your questions, and mostly they're due to you.
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
Jan
on 5 Feb 2012
@Ladan: You expect us to download and install the software, create some relevant inputs, start the debugger and investigate why you get an error using some inputs you do not show in the forum.
This is not a successful strategy, as you found out already.
ll kk
on 5 Feb 2012
Image Analyst
on 5 Feb 2012
We are willing to go through "a little" trouble. But you should be willing to go through more trouble than us because it's your problem. We can spend a few minutes on your problem, not an half an hour or more. I did download the zip file but there were many many m files in there and I didn't know which to run. The link I gave gives some guidance to you so that you can come back with information that can help up help you.
ll kk
on 5 Feb 2012
Categories
Find more on Data Clustering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!