[scilab-Users] How to automatically increase matrix name number

Antoine Monmayrant antoine.monmayrant at laas.fr
Fri Sep 24 10:24:25 CEST 2010


Le 24/09/2010 10:05, Carrico, Paul a écrit :
> All,
> In a loop I would like to create several matrix but their size as well 
> as their number/name number depend on the file results (they're 
> automatically created).
> Is it possible that the name number becomes a variable ?
> for i = 1 : n
>     creation of A1[] / A2[] / A3[] .... An[]
> end for
> Please note each matrix size may be different
> Thanks for any advice
> Paul
> --------------------------------------------------------------------------------
>
>
> Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.
>
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.
>
>    
Here is an example:

i=10;mystr="matrix_"+string(i)+"=[1 2, 3 4]";execstr(mystr);

Once you've ran it, matrix_10 is created and contains [1 2, 3 4].

Antoine

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100924/ff600930/attachment.htm>


More information about the users mailing list