[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Constructing arrays
From: |
Martin Helm |
Subject: |
Re: Constructing arrays |
Date: |
Mon, 26 Jul 2010 17:17:17 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
Am Montag, 26. Juli 2010 16:27:02 schrieb Andy Buckle:
> On Mon, Jul 26, 2010 at 3:11 PM, dirac <address@hidden> wrote:
> > That worked brilliantly, can I ask how it works? Also what does the
> > double equals sign mean (==) in matlab? Again probably a really simple
> > explanation if I knew other languages!
> >
> > What do you mean by the PS you left? I think I accidently replied to the
> > email notification I recieved...
>
> Like in c
> = is the assignment operator
> == is the equality operator
>
> a==0 gives a matrix with ones at locations where a is 0, and zeros
> everywhere else. find() takes a matrix like this and yeilds a matrix
> of the indices of all nonzero values. If you index the original array
> with that, you can set all these locations to something. In this case
> the empty matrix, which removes them.
>
> I recommend that you play around with simple examples.
>
> The PS: If you include previous text in your email please do this
>
> >> A
> >
> > B
>
> C
>
> please do not do this
>
> C
>
> > B
> >
> >> A
>
> (Depending on email client...) the first is easier to follow.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
I am a little bit late now, Andy answered already the remaining questions.
@dirac: If you want to look into the following link
https://prof.hti.bfh.ch/sha1/Labs/PWF/Documentation/OctaveAtBFH.pdf
you will find a nice tutorial written by Andreas Stahel which is based on many
examples and is a good companion to the official octave documentation.
- mh
- Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Martin Helm, 2010/07/26
- Re: Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Martin Helm, 2010/07/26
- RE: Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Andy Buckle, 2010/07/26
- Re: Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Andy Buckle, 2010/07/26
- Re: Constructing arrays,
Martin Helm <=
- Re: Constructing arrays, dirac, 2010/07/27
- Re: Constructing arrays, John W. Eaton, 2010/07/27
- Re: Constructing arrays, dirac, 2010/07/28
- Re: Constructing arrays, Jaroslav Hajek, 2010/07/28