[scilab-Users] string matrix with empty

Adrien Vogt-Schilb vogt at centre-cired.fr
Fri Sep 9 12:00:58 CEST 2011


Hi

For me the obvious way is tu use emtpy strings

string_matrix  =  [
'FILE_No1'  ,  'C:/rep1'  ,  'fct1'  ,  '%t'  ,  '%f'  ,  '',  ''  ,  ''  ;
'FILE_No2'  ,  'C:/rep2'  ,  'fct2'  ,  '%t'  ,  '%t'  ,  'post'  ,  ''  ,  ''  ;
'FILE_No3'  ,  'C:/rep3'  ,  'fct3'  ,  '%f'  ,  '%f'  ,  '',  'result.in'  ,  'result.out';
'FILE_No4'  ,  'C:/rep4'  ,  'fct4'  ,  '%f',  '%f'  ,  ''  ,  ''  ,  ''
]


you could also initialize your matrix like

string_matrix = emptystr(4,8);

and then fill what you need.


Finally, you can also use lists, which allow heterogenous content

A(1)="FileNb"+string(1:4)'
A(2)="C:/Rep"+string(1:4)'
A(3) = "fct"+string(1:4)'



and i believe "cells" can be usefull too. Try help cell


On 09/09/2011 11:51, Carrico, Paul wrote:
> Dear All
> The following syntax failed ... but is it possible to declare a matrix 
> of string with empty cells ?  ... Of course there're some workaround
> string_matrix  =  [
> 'FILE_No1'  ,  'C:/rep1'  ,  'fct1'  ,  '%t'  ,  '%f'  ,  []  ,  []  ,  []  ;
> 'FILE_No2'  ,  'C:/rep2'  ,  'fct2'  ,  '%t'  ,  '%t'  ,  'post'  ,  []  ,  []  ;
> 'FILE_No3'  ,  'C:/rep3'  ,  'fct3'  ,  '%f'  ,  '%f'  ,  []  ,  'result.in'  ,  'result.out';
> 'FILE_No4'  ,  'C:/rep4'  ,  'fct4'  ,  '%f',  '%f'  ,  []  ,  []  ,  []
> ]
> As you can imagine different kinds of information's are concentrated 
> in such matrix
> 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.
>
>
>
>


-- 

*Adrien Vogt-Schilb*
Research Fellow
vogt at centre-cired.fr
Tel: (+33) 1 43 94 73 96
Fax: (+33) 1 43 94 73 70

CIRED

	

45 bis, Av de la Belle Gabrielle
F-94736 Nogent-sur-Marne
http://www.centre-cired.fr/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110909/12f232e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logocired.png
Type: image/png
Size: 4092 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110909/12f232e1/attachment.png>


More information about the users mailing list