How do I clear the errors in my code?There are lot of errors.
Show older comments
This is my code and it is not working.
9 Comments
Azzi Abdelmalek
on 13 Oct 2013
Where is your code?
Gauti
on 13 Oct 2013
sixwwwwww
on 13 Oct 2013
Dear Gauti, attachment is still missing
Gauti
on 13 Oct 2013
Jan
on 13 Oct 2013
"A lot of errors" is not possible in Matlab. The processing stops at the first error, so there cannot be more than one error. So please explain, why you think, that there are many errors. What messages do you see where?
Image Analyst
on 13 Oct 2013
Unless he means syntax errors, which are highlighted by a red line at the offending code and in the right margin.
Gauti
on 16 Oct 2013
Gauti
on 16 Oct 2013
Answers (1)
Image Analyst
on 13 Oct 2013
1 vote
We don't really need your code if you look at this link and do what it shows you: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/
13 Comments
Gauti
on 13 Oct 2013
Image Analyst
on 13 Oct 2013
The first line of your code is this:
a = newfis('gauti','sugeno');
I don't have newfis(), so I can't run your code. Why don't you tell us what your error message are? Copy and paste all the red text. For example, does it say
Undefined function 'newfis' for input arguments of type 'char'.
Error in test (line 1)
a = newfis('gauti','sugeno');
like it does for me? If so, you haven' defined newfis().
Gauti
on 16 Oct 2013
Gauti
on 16 Oct 2013
Laurent
on 16 Oct 2013
You still did not answer the question of Image Analyst. What is the error message that you get while running gauti.m.
Unfortunately I don't have the fuzzy logic toolbox, but what I get from the help is that you need at least 2 inputs for evalfis. An input matrix, and a FIS structure. I assume SUGENO1 is your FIS structure, so what you still need is to define the input matrix.
Let's say we call the input matrix ' inputmat '. Then you could call evalfis like this:
evalfis(inputmat, SUGENO1)
Gauti
on 16 Oct 2013
Gauti
on 16 Oct 2013
Gauti
on 16 Oct 2013
Laurent
on 16 Oct 2013
How did you define inputmat?
Gauti
on 16 Oct 2013
Gauti
on 16 Oct 2013
Image Analyst
on 16 Oct 2013
We don't know what evalfis() or newfis() are. All we know is that they require two inputs. And you need to pass in two inputs that match the type of input they are expecting. If you are trying to call those routines I would think that you would know what they want and what they return. Otherwise, why would you call them?
Categories
Find more on Fuzzy Logic Toolbox 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!