[Scilab-users] Re : for-loop does't work
Antoine Monmayrant
amonmayr at laas.fr
Fri Jun 5 23:17:51 CEST 2015
Hi,
I think Pierre Aimé is right about a possible issue with encoding: your ";" looks like a semi-colon but seems to be a completely different beast on my computer:
...
ascii("A(1,:)=x(i)ï¼") // Text copied from your original mail
and
ascii("A(1,:)=x(i);") // Text copied from my console
...
"ï¼" is definitely not a ";"
Cheers,
Antoine
Le Vendredi 5 Juin 2015 14:02 CEST, Pierre-Aimé Agnel<pierre-aime.agnel at scilab-enterprises.com> a écrit:
> Hi,
>
> I believe the problem is on the encoding of the text
>
> A=zeros(151,3);
> x=[0.0 5.0 10.0 15.0 19.0]
> i=5
> A(1,:)=x(i)
> for i=1:5
> A(1,:)=x(i);
> end
>
> This worked for me without any problems
> compare
>
> ascii("A(1,:)=x(i);") // Text copied from your original mail
> and
> ascii("A(1,:)=x(i);") // Text copied from my console
>
> Best,
>
> Le 05/06/2015 13:40, paul.carrico at free.fr a écrit :
> > hi
> >
> > Maybe you should first explain what you would like to do ...
> >
> > A is a matrix 151x3
> > x is a matrix 1x5
> >
> > I do not understand the prupose of the loop????
> >
> > Depending on what you are expecting for, a good solution will be found
> >
> > Paul
> >
> > ----- Mail d'origine -----
> > De: fujimoto2005 <fujimoto2005 at gmail.com>
> > À: users at lists.scilab.org
> > Envoyé: Fri, 05 Jun 2015 12:36:58 +0200 (CEST)
> > Objet: [Scilab-users] for-loop does't work
> >
> > I run the following script.
> > It works at 4th line
> > But It failes from 5th line to 7th line.
> > It seems to be right
> > Where is this script wrong?
> >
> > *******************
> > A=zeros(151,3);
> > x=[0.0 5.0 10.0 15.0 19.0]
> > i=5
> > A(1,:)=x(i)
> > for i=1:5
> > A(1,:)=x(i);
> > end
> >
> >
> >
> > --
> > View this message in context: http://mailinglists.scilab.org/for-loop-does-t-work-tp4032382.html
> > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> > _______________________________________________
> > users mailing list
> > users at lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/users
> >
> > _______________________________________________
> > users mailing list
> > users at lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/users
>
> --
> Pierre-Aimé Agnel
> R&D Projects Manager
> Phone: +33.1.80.77.04.67
> Mobile: +33.6.82.49.35.23
> -----------------------------------------------------------
> Scilab Enterprises
> 143bis rue Yves Le Coz - 78000 Versailles, France
> Phone: +33.1.80.77.04.68
> http://www.scilab-enterprises.com
>
More information about the users
mailing list