Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: how to access a value in a variable and send into a struct
Replies: 3   Last Post: Jan 2, 2013 10:02 AM

 Messages: [ Previous | Next ]
 sathish kumar Posts: 17 Registered: 7/24/12
Re: how to access a value in a variable and send into a struct
Posted: Jan 2, 2013 3:27 AM

"Nasser M. Abbasi" wrote in message <kbui3c\$17i\$1@speranza.aioe.org>...
> On 1/1/2013 5:29 AM, sathish kumar wrote:
> > i want access the value of a variable 'start', iam getting error as undefined variable or function 'start'
> > i have not defined ''start'' before this part of code,directly i am assigning value of i to the ''start'' variable
> > here is my code
> > for i=1:length(group)
> > if fg >= g(i);
> > if kg >= l(i);
> > if max h == h(i);
> > start = i
> > break;
> > end
> > end
> > end
> > end
> > do_game=cri{start};
> >
> > here cri=sem_de;
> > sem_de{j}=sem;
> >
> >
> > please tell me how to define a variable ''start'' in this code
> >

>
> Have you thought what might happen if you finish the above loop
> over length(group) and the statment `start=i` is never executed?
>
> What would happen in this case when you get to the line below
> this loop which says
>
> do_game=cri{start};
>
> would not 'start' be undefined in this case?
>
> Also, what exactly is this suppose to mean?
>
> if max h == h(i);
>
> And why not replace all these `if` nesting with one logical && ?
>
> --Nasser

i have not understood u r idea
please tell me the way to define the variable ''start''
it is must to define variable or to change the index or to use logical operaters

Date Subject Author
1/1/13 sathish kumar
1/1/13 Nasser Abbasi
1/2/13 sathish kumar
1/2/13 Steven Lord