Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
programm error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gaurav Verma  
View profile  
 More options Feb 13, 1:12 pm
Newsgroups: comp.soft-sys.matlab
From: "Gaurav Verma" <gkumar...@gmail.com>
Date: Mon, 13 Feb 2012 18:12:11 +0000 (UTC)
Local: Mon, Feb 13 2012 1:12 pm
Subject: programm error
Hello sir,
i m doing one program shows some error.
can u help me?

Ie=imread('imd.jpg');
[x,y]=size(Ie);
h=x/2;
for i=1:x
    for j=1:y
    if Ie(i,j)==0
       Ic(i,j)=0;
    else if ((Ie(i+1,j-1)==1)& (Ie(i+1,j+1)==1))
              Ic(i,j)=0;
    else if (((Ie(i+1,j-1)==1)&(i<=h))|(Ie(i+1,j+1)==1) & (i>h))
        Ic(i,j)=1;
    else if (((Ie(i+1,j+1)==1) & i<=h)|| (Ie(i+1,j-1)==1)& (i>h))
            Ic(i,j)=-1;
                end %if
                end %for
        end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dpb  
View profile  
 More options Feb 13, 5:07 pm
Newsgroups: comp.soft-sys.matlab
From: dpb <n...@non.net>
Date: Mon, 13 Feb 2012 16:07:18 -0600
Local: Mon, Feb 13 2012 5:07 pm
Subject: Re: programm error
On 2/13/2012 12:12 PM, Gaurav Verma wrote:
> Hello sir,
> i m doing one program shows some error.
> can u help me?

...

And how are we to know what error that might be if you provide no clues...

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven_Lord  
View profile  
 More options Feb 13, 5:14 pm
Newsgroups: comp.soft-sys.matlab
From: "Steven_Lord" <sl...@mathworks.com>
Date: Mon, 13 Feb 2012 17:14:02 -0500
Local: Mon, Feb 13 2012 5:14 pm
Subject: Re: programm error

"Gaurav Verma" <gkumar...@gmail.com> wrote in message

news:jhbjpr$pho$1@newscl01ah.mathworks.com...

> Hello sir,
> i m doing one program shows some error.
> can u help me?

> Ie=imread('imd.jpg'); [x,y]=size(Ie);
> h=x/2;
> for i=1:x
>    for j=1:y
>    if Ie(i,j)==0 Ic(i,j)=0;
>    else if ((Ie(i+1,j-1)==1)& (Ie(i+1,j+1)==1))

There's no such thing as the 0th column of a matrix in MATLAB. The first
row/column/element/etc. of an array is row/column/element/etc. 1.

*snip*

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roger Stafford  
View profile  
 More options Feb 14, 10:04 am
Newsgroups: comp.soft-sys.matlab
From: "Roger Stafford" <ellieandrogerxy...@mindspring.com.invalid>
Date: Tue, 14 Feb 2012 15:04:44 +0000 (UTC)
Local: Tues, Feb 14 2012 10:04 am
Subject: Re: programm error

- - - - - - - - -
  I see at least two problems here.  First, in the for-loops the index j-1 can equal zero and the indices i+1 and j+1 can be above the range of Ic which will produce an error message.  Second, the 'elseif' should not have a space between the 'else' and the 'if'.  As it stands it does not have enough end's and that will create a parsing error message when the program is compiled.

Roger Stafford


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »