Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Illegal use of reserved keyword "end".

458 views
Skip to first unread message

Gurpreet

unread,
Dec 15, 2008, 1:20:18 PM12/15/08
to
why error Illegal use of reserved keyword "end". is coming
f=imread('5.jpg');
[r,c]=size(f);

fg(r+5,c+5)=0;
fg=f;
y=0;
for i=1:r
for j=1:c
for k=1:5
for l=1:5
y(i,j)=y(i,j)+(a(i,j) + fg(k,l)/(1+exp(-(fg(i,j)-fg(k,l))/25))/{a(i,j)/(1+exp(-(fg(i,j)-fg(k,l)))/25)
end
end
end
end

ImageAnalyst

unread,
Dec 15, 2008, 1:32:20 PM12/15/08
to
>                 y(i,j)=y(i,j)+(a(i,j) + fg(k,l)/(1+exp(-(fg(i,j)-fg(k,l))/25))/{a(i,j)/(1+exp(-(fg(i,j)-fg(k,l)))/2­5)
>                 end
>             end
>         end
>     end

------------------------------------------------------------------------------
It appears that you have a curly brace in there just before the a(i,j)
for some reason. Probably should be a round parenthesis. Also, when
I pasted your code into another program, it's showing a hidden
character between the 2 and the 5 of the last 25 in your equation.
Regards,
ImageAnalyst

David

unread,
Dec 15, 2008, 1:35:04 PM12/15/08
to
"Gurpreet " <gur_s...@rediffmail.com> wrote in message <gi6751$4hk$1...@fred.mathworks.com>...

i haven't checked it all but in the y()= equation there is an unmatched {

0 new messages