Error in this code

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
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
ll kk on 4 Feb 2012
Thanks. I have done this before. I can not fix the error.
ll kk
ll kk on 4 Feb 2012
I have given up on asking questions in this forum. Nobody can answer.
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
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
ll kk on 5 Feb 2012
The file contains all the inputs. You just have to press a button to run the code and see the errors. Also I am asking a question so that somebody who is willing to answer my question goes and download the code and answer it. If you are not willing to help and go through all the trouble that you have mentioned, why are you even trying to pretend that you are helping, just leave my question unanswered.
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
ll kk on 5 Feb 2012
If you had read my question you would have known which m file to run.

Sign in to comment.

Categories

Asked:

on 4 Feb 2012

Edited:

on 30 Sep 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!