help-octave
[Top][All Lists]
Advanced

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

Re: Matrix like operations in a .oct file


From: Kai Torben Ohlhus
Subject: Re: Matrix like operations in a .oct file
Date: Sun, 6 Oct 2013 22:37:20 +0200

On Sun, Oct 6, 2013 at 8:23 PM, babelproofreader <address@hidden> wrote:
<snip>

Matrix output (price.rows (), price.cols()); this doesn't change things. The
problem boils down to writing "result" to "output," i.e. output(ii,1) =
result ; // this writing to output matrix fails

Hi,

On the left hand side of that statement you are referring to a double& with ::operator()  (http://octave.sourceforge.net/doxygen/html/d0/d26/classArray.html#a0744955a6f6c30c221b4e793cb8f5216). But on the right hand side you provide a Matrix. Your Matrix result seems to be more or less a scalar. Why don't you declare it as double directly? Otherwise this might help for this code snippet you provide:

output (ii,1) = result (0, 0);

HTH,
Kai

reply via email to

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