<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#330000">
<br>
Hi<br>
<br>
This will show you an example<br>
<br>
A=[2 4 6 8 10];<br>
A(3) = [] //deletes the 3rd element of A.<br>
<br>
<br>
But be aware, if A is very big, this might be very time consuming.
(I am not sure, thought)<br>
You could prefer something as<br>
<br>
B=A //once at the begining<br>
<br>
B(3) = %nan //when the third element should be "deleted"<br>
<br>
if you do so beware of comparisons with nans: they always return
false!<br>
1==%nan<br>
1>%nan<br>
1<%nan<br>
%nan == %nan<br>
<br>
<br>
<br>
Le 31/05/2011 11:48, Carrico, Paul a écrit :
<blockquote
cite="mid:55A12CBC06A8C9459DCE0BBEF8122FDC06F62EF2@exchsrv.AUXITROL1"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="MS Exchange Server version
6.5.7654.12">
<title>updating matrix</title>
<!-- Converted from text/plain format -->
<br>
<p><font size="2">Dear all<br>
<br>
I've the following matrix :<br>
<br>
A = [N1 N2 N3 .... Ni .... Nn ]' with n data<br>
<br>
In an iterative process, the idea is to decrease the size of
the matrix when the wanted value(integer) is found .<br>
<br>
i = 1 -> size = n<br>
i = 2 -> the ith value is removed => size = n-1<br>
and so on up to n = 1<br>
<br>
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 ..... ?<br>
<br>
The aim is both to limit the number of iterations (and to
limit the time consuming) and to have a "clean" synthax !<br>
<br>
Thanks for any advice<br>
<br>
Regards<br>
<br>
Paul<br>
<br>
</font>
</p>
<pre>--------------------------------------------------------------------------------
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.
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<style>
<!--
p
{margin:0pt;
color:teal;
font-family:"Cambria Math"
font-size:12.0pt;
}
-->
</style>
<p><b>Adrien Vogt-Schilb</b></p>
<p>Research Fellow</p>
<p><a a="" href="mailto:vogt@centre-cired.fr"
style="text-decoration: none; color: teal;">vogt@centre-cired.fr</a></p>
<p>Tel: (+33) 1 43 94 73 96</p>
<p>Fax: (+33) 1 43 94 73 70</p>
<table style="border: medium none; margin-left: 1pt; margin-top:
4pt;" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0pt;">
<p><img src="cid:part1.06020808.01040202@centre-cired.fr"
alt="CIRED" width="54"></p>
</td>
<td style="padding: 0pt 7pt;" valign="middle">
<p style="font-size: 10pt;">45 bis, Av de la Belle
Gabrielle</p>
<p style="font-size: 10pt;">F-94736 Nogent-sur-Marne</p>
<p style="font-size: 10pt;"><a
href="http://www.centre-cired.fr/" style="color:
teal;">http://www.centre-cired.fr/</a></p>
</td>
</tr>
</tbody>
</table>
<p> </p>
</div>
</body>
</html>