help-octave
[Top][All Lists]
Advanced

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

Automatic Type Conversion


From: r-j-k
Subject: Automatic Type Conversion
Date: Thu, 16 Jul 2009 19:13:41 -0700 (PDT)

Hi,

I have a special matrix type, my_matrix, defined in an oct file. I want my
my_matrix to be automatically converted to an octave matrix when a function
is called expecting an octave matrix. Is this possible? I have implemented
the matrix_value() and is_real_matrix() methods. Currently, I get the
following when I attempt to use such functions:

octave:6> x = my_matrix(1);
octave:7> log(x);
error: mapper: wrong type argument `my_matrix'
octave:7> eig(x);
error: eig: wrong type argument `matrix'

Any tips?

Thanks.

-- 
View this message in context: 
http://www.nabble.com/Automatic-Type-Conversion-tp24527529p24527529.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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