Octave objects
Jeremy Kepner
kepner at ll.mit.edu
Wed Dec 24 12:55:27 CST 2008
Hi John,
more specifically the error is that
x(':',':') = 0
works generally, but not inside an object call?
Regards. -Jeremy
On Dec 23, 2008, at 4:27 PM, Jeremy Kepner wrote:
> Hi John,
> thanks, got through this error. Any ideas
> on where these errors might be hiding?
>
> error: octave_char_matrix_str::valid_as_scalar_index(): not
> implemented
> error: assignment failed, or no method for `scalar = scalar'
> error: evaluating assignment expression near line 59, column 57
> error: evaluating if command near line 58, column 11
> error: evaluating for command near line 57, column 9
> error: evaluating for command near line 56, column 1
> error: evaluating if command near line 46, column 1
> error: called from `reconstruct' in file `/home/gridsan/kepner/SVN/
> pMatlab/trunk/pMatlab/src/reconstruct.m'
> error: evaluating assignment expression near line 38, column 5
> error: evaluating if command near line 23, column 5
> error: evaluating if command near line 22, column 1
> error: called from `agg' in file `/home/gridsan/kepner/SVN/pMatlab/
> trunk/pMatlab/src/@dmat/agg.m'
> error: evaluating assignment expression near line 78, column 8
> error: called from `pStream' in file `/home/gridsan/kepner/
> KepnerBookCode/Examples/Stream/pStream.m'
>
>
> Thanks. Regards. -Jeremy
>
> On Nov 10, 2008, at 6:31 PM, John W. Eaton wrote:
>
>> On 6-Nov-2008, Jeremy Kepner wrote:
>>
>> | Hi John,
>> | I am testing version 3.1.51 octave.
>> | When I run the attached program I get the
>> | following error having to do with objects
>> | in octave:
>> |
>> | >> pStream
>> | warning: version: ignoring extra arguments
>> | error: `argn' undefined near line 0 column 10
>> | error: evaluating argument list element number 1
>> | error: evaluating assignment expression near line 35, column 5
>> | error: called from `inputname' in file `/usr/local/octave-3.1.51/
>> | share/octave/3.1.51/m/miscellaneous/inputname.m'
>> | error: evaluating argument list element number 2
>> | error: called from `subsasgn' in file `/home/gridsan/kepner/
>> pMatlab/
>> | src/@dmat/subsasgn.m'
>> | error: assignment failed, or no method for `class = matrix'
>> | error: evaluating assignment expression near line 0, column 9
>> | error: evaluating if command near line 84, column 1
>> | error: called from `zeros' in file `/home/gridsan/kepner/pMatlab/
>> src/
>> | @map/zeros.m'
>> | error: evaluating argument list element number 1
>> | error: evaluating binary operator `+' near line 68, column 39
>> | error: evaluating assignment expression near line 68, column 10
>> | error: called from `pStream' in file `/home/gridsan/kepner/
>> | KepnerBookCode/Examples/Stream/pStream.m'
>>
>> I don't see "inputname" anywhere in the code you sent, but as I
>> recall
>> from the from testing pMatlab you need the following change:
>>
>> * assignin.diff: There is a bug in Octave that prevents the
>>
>> assignin('caller', inputname(1), []);
>>
>> statement from working. Since this call to assignin is an attempt
>> at optimizing memory usage and does not affect the results, it
>> seems simplest to comment this line out.
>>
>> diff -ru pMatlab.orig/src/@dmat/subsasgn.m pMatlab/src/@dmat/
>> subsasgn.m
>> --- pMatlab.orig/src/@dmat/subsasgn.m 2005-03-07 15:07:08.000000000
>> -0500
>> +++ pMatlab/src/@dmat/subsasgn.m 2008-07-22 11:52:40.000000000 -0400
>> @@ -12,7 +12,7 @@
>>
>> % Instead of creating a copy of a, write directly to the memory
>> % allocated for a in the caller's workspace
>> -assignin('caller', inputname(1), []);
>> +%assignin('caller', inputname(1), []);
>>
>> if length(s)==1 %subscripting level
>> if s.type == '()' %subscripting type -> parenthesis
>>
>>
>>
>> jwe
>>
>
More information about the Bug-octave
mailing list