[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help, answers showing in command prompt even though semicolon is use
From: |
Sergei Steshenko |
Subject: |
Re: Help, answers showing in command prompt even though semicolon is used in if statement |
Date: |
Tue, 30 Aug 2011 17:16:01 -0700 (PDT) |
----- Original Message -----
> From: strugglinscientist <address@hidden>
> To: address@hidden
> Cc:
> Sent: Wednesday, August 31, 2011 3:09 AM
> Subject: Help, answers showing in command prompt even though semicolon is
> used in if statement
>
> What am I doing wrong? I do not want to be shown the answers
>
> Here is my code
> if(amIOne==1 && amITwo==2 && amIThree==3)
> {
> dataForZero=[dataForZero dataQZero];
> dataForOne=[dataForOne dataQOne];
> }
> end
>
> Which results in the following in the octave prompt
>
> ans=
> {
> [1,1]=-709
> [2,1]=-452
> }
>
> Yet if I have the following code anywhere outside the if statement
>
>
> dataForZero=[dataForZero dataQZero];
> dataForOne=[dataForOne dataQOne];
>
> The answers are NOT posted to my prompt. How can I leave those inside the if
> statement and not have the answers show up in my prompt? Running through a
> lot of data...
>
> --
Why di you have curly braces ? Octave language is not "C"/Perl.
Regards,
Sergei.