# Math Help - Help needed in Syntax writing in MATLAB

1. ## Help needed in Syntax writing in MATLAB

Howdi all,
I'm trying to write the syntax for this formula but keep getting errors. Any help ? I belive it's happening due the complex number (i).

2. Originally Posted by Geomorphologist
Howdi all,
I'm trying to write the syntax for this formula but keep getting errors. Any help ? I belive it's happening due the complex number (i).

CB

Well, If i'm using this syntax (Without the complex number) - It works :

>> (tanh(exp(log(3*pi)+log10(pi)))^3)/(7^8)

ans =

1.7347e-007

But as soon as I add the 'i' :

>> (tanh(exp(log(3*pi)+log10(pi)i))^3)/(7^8)
|
Error: Unexpected MATLAB expression.

Something went wrong.

4. Originally Posted by Geomorphologist
Well, If i'm using this syntax (Without the complex number) - It works :

>> (tanh(exp(log(3*pi)+log10(pi)))^3)/(7^8)

ans =

1.7347e-007

But as soon as I add the 'i' :

>> (tanh(exp(log(3*pi)+log10(pi)i))^3)/(7^8)
|
Error: Unexpected MATLAB expression.

Something went wrong.
Code:
--> (tanh(exp(log(3*pi)+log10(pi)*i))^3)/(7^8)

ans =

1.7347e-007 +2.7977e-014i
CB

5. Originally Posted by CaptainBlack
Code:
--> (tanh(exp(log(3*pi)+log10(pi)*i))^3)/(7^8)

ans =

1.7347e-007 +2.7977e-014i
CB
Danke!!!
So obvious ...