help-octave
[Top][All Lists]
Advanced

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

Re: S: Example


From: Christoph Mecklenbraeuker
Subject: Re: S: Example
Date: Tue, 18 Jul 1995 19:24:27 +0200 (MET DST)

Hi Nils,

your question was:
> Does anyone have an example for changing elements of a matrix which
> match a special condition? I will change all members of a matrix which are 
> lower than the value x to the value y.

try:
>   octave:1> a = [ -5 2; 4 7]
>   a =
>    -5   2
>     4   7
>
>   octave:2> a(a<0) = 4711
>   a =
>    4711     2
>       4     7


all the best,
Christoph

PS: there ain't no stupid questions. Questions is, what this list is about
---
Christoph Mecklenbraeuker             | send electronic mail to:
Lehrstuhl f. Signaltheorie (IC 5/35)  | address@hidden
Ruhr Universitaet Bochum              | Tel: +49(0234) 700 6119
D-44780 Bochum, Germany               | Fax: +49(0234) 709 4261 

reply via email to

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