[Scilab-users] [help] converting a simple C code to Scilab

Mike Page Mike at Page-One.Waitrose.com
Fri May 2 10:25:34 CEST 2014


Hi,

vet = 1:4;
disp (vet(3));

will do almost the same thing.  But note that Scilab indices start at 1, not
zero, so vet does not include the element vet[0] = 0;

HTH,
Mike.


-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org]On Behalf Of
Alessandro Schmitt
Sent: 02 May 2014 00:41
To: users at lists.scilab.org
Subject: [Scilab-users] [help] converting a simple C code to Scilab


Hi, how would this be written using scilab?

   int vet[10];
   int i=0;

   do
   {
       vet[i]=i;
       i++;
   }
   while (i<5);

    printf("%i",vet[3]); //prints the number 3

Thanks.



--
View this message in context:
http://mailinglists.scilab.org/help-converting-a-simple-C-code-to-Scilab-tp4
030411.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


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4577 / Virus Database: 3931/7425 - Release Date: 05/01/14




More information about the users mailing list