[Top][All Lists]

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

Re: problem in operation

From: Oliver Heimlich
Subject: Re: problem in operation
Date: Thu, 26 Mar 2015 21:32:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0

Am 26.03.2015 um 20:05 schrieb Yonghua Liu:

y=2**m -operation get error information

y=exp(0.69315*m)- work fine.

What is wrong wit ** operation?

Thank you very much



you sure that m=linspace(1,8,0.1); is correct? It returns simply 8 for me and everything else works. Which version of GNU Octave are you using?

** (as well as ^) is the operator for the matrix power function “mpower”. You probably want to compute an element-wise power function:

2^1.0, 2^1.1, 2^1.2, …

This can be done with the .** (or .^) operator or equivalently with the “power” function.


reply via email to

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