[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Create a logical array of 0
From: |
David Bateman |
Subject: |
Re: Create a logical array of 0 |
Date: |
Fri, 3 Sep 2004 22:58:09 +0200 |
User-agent: |
Mutt/1.4.1i |
Ok, I attach a patch that addresses the concatenation of boolean
scalars and matrices, and the indexing of booleans and integers.
The patch also addresses the issues with repmat...
Log below showing that the patch works as expected...
D.
octave:1> a = logical(1); b = a([1,1]); c= [a,a];whos a b c
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x1 1 bool
rwd b 1x2 2 bool matrix
rwd c 1x2 2 bool matrix
Total is 5 elements using 5 bytes
octave:2> a = logical([1,1]); b = a([1,1]); c= [a,a];whos a b c
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x2 2 bool matrix
rwd b 1x2 2 bool matrix
rwd c 1x4 4 bool matrix
Total is 8 elements using 8 bytes
octave:3> a = int8(1); b = a([1,1]); c= [a,a];whos a b c
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x1 1 int8 scalar
rwd b 1x2 2 int8 matrix
rwd c 1x2 2 int8 matrix
Total is 5 elements using 5 bytes
octave:4> a = int8([1,1]); b = a([1,1]); c= [a,a];whos a b c
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x2 2 int8 matrix
rwd b 1x2 2 int8 matrix
rwd c 1x4 4 int8 matrix
Total is 8 elements using 8 bytes
octave:5> a = logical(1); b = repmat(a,10,10); whos a b
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x1 1 bool
rwd b 10x10 100 bool matrix
Total is 101 elements using 101 bytes
octave:6> a = logical([1,1]); b = repmat(a,10,10); whos a b
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x2 2 bool matrix
rwd b 10x20 200 bool matrix
Total is 202 elements using 202 bytes
octave:7> a = int8(1); b = repmat(a,10,10); whos a b
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x1 1 int8 scalar
rwd b 10x10 100 int8 matrix
Total is 101 elements using 101 bytes
octave:8> a = int8([1,1]); b = repmat(a,10,10); whos a b
*** local user variables:
Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a 1x2 2 int8 matrix
rwd b 10x20 200 int8 matrix
Total is 202 elements using 202 bytes
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
patch-2.1.58
Description: Text document
changelog-2.1.58
Description: Text document
RE: Create a logical array of 0, Randy Gober, 2004/09/03
Re: Create a logical array of 0, David Bateman, 2004/09/03
Re: Create a logical array of 0, Josep Monés i Teixidor, 2004/09/03
Re: Create a logical array of 0, John W. Eaton, 2004/09/03