help-octave
[Top][All Lists]
Advanced

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

Re: Regarding Standalone Program


From: Jaroslav Hajek
Subject: Re: Regarding Standalone Program
Date: Wed, 6 Aug 2008 12:44:06 +0200

On Wed, Aug 6, 2008 at 12:29 PM, Raghavendra K <address@hidden> wrote:
> Hi Jaroslav,
>    The expm function is working fine for me. I have also linked up that with
> MPI and am able to run my application on 10 processors simultaneously, each
> processor invoking its native octave.
> I have problem with the xpow function.
> Matrix B = xpow(A, 100);
> where A is also of type Matrix gives me an error while compilation.
>
> error: no match for 'operator=' in 'B = xpow(const Matrix &,
> double)(1.0e+2)'
>
> where each element of the matrix A is initialized with the value 1.1
>
> How do I fix it?
>

The xpow functions return an octave_value object, which is a general
container able to hold any Octave type. (The reason for this choice is
basically that A^b can be complex even if A and b are both rea)l.
Thus, you need to do:

Matrix B = xpow (A, 100).matrix_value ();

cheers

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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