[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excluding elements of a matrix

From: Francesco Potorti`
Subject: Re: Excluding elements of a matrix
Date: Tue, 19 Dec 2006 18:56:43 +0100

>It's unwieldy, but you can copy your matrix to a new one, remove the
>elements you don't want to see, and then display that matrix instead:
>     B = A;
>     B(6) = [];  #Remove 6th element from B.
>     B

Expanding on this suggestion, you can do:

index=1:length(A);            # index of all elements of A
index([6 8 9]) = [];          # remove some of them
plot(A(index));               # access only the interesting elements

Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
Web:           Key:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]