From: vgsangiuliano Poretti on
Hi to all,
Can anyone say me how to use a field of a struct variable as a counter for a FOR cicle?

When I use

for x.test=1:1:10 I get

|
Error: Unexpected MATLAB operator.

of course using for x=1:1:10 is correct

Thank you
From: us on
"vgsangiuliano Poretti" <vgsangiuliano(a)gmail.com> wrote in message <hp6uk8$e2j$1(a)fred.mathworks.com>...
> Hi to all,
> Can anyone say me how to use a field of a struct variable as a counter for a FOR cicle?
>
> When I use
>
> for x.test=1:1:10 I get
>
> |
> Error: Unexpected MATLAB operator.
>
> of course using for x=1:1:10 is correct
>
> Thank you

a hint:
- there's no solution: this syntax simply does not work...

us
From: vgsangiuliano Poretti on
"us " <us(a)neurol.unizh.ch> wrote in message <hp6v2p$jq6$1(a)fred.mathworks.com>...
> "vgsangiuliano Poretti" <vgsangiuliano(a)gmail.com> wrote in message <hp6uk8$e2j$1(a)fred.mathworks.com>...
> > Hi to all,
> > Can anyone say me how to use a field of a struct variable as a counter for a FOR cicle?
> >
> > When I use
> >
> > for x.test=1:1:10 I get
> >
> > |
> > Error: Unexpected MATLAB operator.
> >
> > of course using for x=1:1:10 is correct
> >
> > Thank you
>
> a hint:
> - there's no solution: this syntax simply does not work...
>
> us

Thank you for reply
So isn't there any way to do that?
From: us on
"vgsangiuliano Poretti" <vgsangiuliano(a)gmail.com> wrote in message <hp6vaq$n0a$1(a)fred.mathworks.com>...
> "us " <us(a)neurol.unizh.ch> wrote in message <hp6v2p$jq6$1(a)fred.mathworks.com>...
> > "vgsangiuliano Poretti" <vgsangiuliano(a)gmail.com> wrote in message <hp6uk8$e2j$1(a)fred.mathworks.com>...
> > > Hi to all,
> > > Can anyone say me how to use a field of a struct variable as a counter for a FOR cicle?
> > >
> > > When I use
> > >
> > > for x.test=1:1:10 I get
> > >
> > > |
> > > Error: Unexpected MATLAB operator.
> > >
> > > of course using for x=1:1:10 is correct
> > >
> > > Thank you
> >
> > a hint:
> > - there's no solution: this syntax simply does not work...
> >
> > us
>
> Thank you for reply
> So isn't there any way to do that?

???... did you read and comprehend what i just wrote(?)...

us
From: vgsangiuliano Poretti on
"us " <us(a)neurol.unizh.ch> wrote in message <hp6vnd$rvv$1(a)fred.mathworks.com>...
> "vgsangiuliano Poretti" <vgsangiuliano(a)gmail.com> wrote in message <hp6vaq$n0a$1(a)fred.mathworks.com>...
> > "us " <us(a)neurol.unizh.ch> wrote in message <hp6v2p$jq6$1(a)fred.mathworks.com>...
> > > "vgsangiuliano Poretti" <vgsangiuliano(a)gmail.com> wrote in message <hp6uk8$e2j$1(a)fred.mathworks.com>...
> > > > Hi to all,
> > > > Can anyone say me how to use a field of a struct variable as a counter for a FOR cicle?
> > > >
> > > > When I use
> > > >
> > > > for x.test=1:1:10 I get
> > > >
> > > > |
> > > > Error: Unexpected MATLAB operator.
> > > >
> > > > of course using for x=1:1:10 is correct
> > > >
> > > > Thank you
> > >
> > > a hint:
> > > - there's no solution: this syntax simply does not work...
> > >
> > > us
> >
> > Thank you for reply
> > So isn't there any way to do that?
>
> ???... did you read and comprehend what i just wrote(?)...
>
> us

Sure I understood, I only thought that my way was wrong but maybe there was another way to get the same result.
So if no way, I will change my code using the counter not being a field of a struc variable.
Thank you