help-octave
[Top][All Lists]
Advanced

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

some more uint8 woes...


From: John W. Eaton
Subject: some more uint8 woes...
Date: Tue, 22 Mar 2005 08:22:54 -0500

On 12-Mar-2005, Brian Blais <address@hidden> wrote:

| I am still having some problems dealing with uint8 types.  In my
| application, I want to be able to pass in either a regular (double)
| matrix or a uint8 matrix, copy values from the matrix to another 
| (double) matrix but (due to size) not convert the entire original 
| matrix.  For example, I want to be able to pass in a large 500x500x300 
| matrix, and get smaller pieces on the order of 20x20 out of the larger 
| one.  I wrote a simple program to play with some of the uint8 
| properties, but get an error I don't understand.  I'm using octave 
| version 2.1.64 in Linux.  The simple code below takes in a matrix, 
| returns the first value of the matrix as a double Matrix (1x1) value. 
| It works for the uint8 case, but breaks with the double case like:
| 
| >> a=example_uint8(uint8(20))
| here
| retval = 20
| a = 20
| >> a=example_uint8(20)
| error: octave_base_value::uint8_array_value(): wrong type argument `scalar'

The problem is that there is no uint8_array_value method defined for
the double scalar and N-d Array octave_value objects.  Perhaps there
should be.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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