From: Eamonn B on
I want to program a for loop so that it goes backwards such like 5 4 3 2 1

how do I do this?
From: the cyclist on
"Eamonn B" <pakblue11(a)gmail.com> wrote in message <hpadsc$7r1$1(a)fred.mathworks.com>...
> I want to program a for loop so that it goes backwards such like 5 4 3 2 1
>
> how do I do this?

for ii=5:-1:1
% Loopy stuff goes here
end
From: Eamonn B on
"the cyclist" <thecyclist(a)gmail.com> wrote in message <hpaeit$gr4$1(a)fred.mathworks.com>...
> "Eamonn B" <pakblue11(a)gmail.com> wrote in message <hpadsc$7r1$1(a)fred.mathworks.com>...
> > I want to program a for loop so that it goes backwards such like 5 4 3 2 1
> >
> > how do I do this?
>
> for ii=5:-1:1
> % Loopy stuff goes here
> end
Thanks that worked