RE : [scilab-Users] updating matrix

Carrico, Paul paul.carrico at esterline.com
Tue May 31 13:40:28 CEST 2011


great ... thanks to everybody

(I was thinking in something much more complicated !!!!!!!)

Paul


-------- Message d'origine--------
De: Mike Page [mailto:Mike at Page-One.Waitrose.com]
Date: mar. 31/05/2011 12:02
À: users at lists.scilab.org
Objet : RE: [scilab-Users] updating matrix
 
updating matrixHi Paul,

I usually use "find" for this kind of operation

--> A = A (find (A ~= X))

will remove the entry A=X from A if it is there.

I don't know how efficient this is, but the syntax is quite neat.

Hope that helps.
Mike.

  -----Original Message-----
  From: Carrico, Paul [mailto:paul.carrico at esterline.com]
  Sent: 31 May 2011 10:48
  To: users at lists.scilab.org
  Subject: [scilab-Users] updating matrix




  Dear all

  I've the following matrix :

  A = [N1 N2 N3 .... Ni .... Nn ]' with n data

  In an iterative process, the idea is to decrease the size of the matrix
when the wanted value(integer) is found .

  i = 1 -> size = n
  i = 2 -> the ith value is removed => size = n-1
  and so on up to n = 1

  Is there a relevant way to do it without creating a temporary matrix B ->
copying the upper part/lower part of the matrix -> removing A and renaming B
in A ..... ?

  The aim is both to limit the number of iterations (and to limit the time
consuming) and to have a "clean" synthax !

  Thanks for any advice

  Regards

  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.



--------------------------------------------------------------------------------


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3740 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110531/f51c554d/attachment.bin>


More information about the users mailing list