Results 1 to 5 of 5

Math Help - Help needed in Syntax writing in MATLAB

  1. #1
    Newbie
    Joined
    Mar 2010
    Posts
    11

    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).

    Thanks in advance.
    Last edited by Geomorphologist; March 2nd 2010 at 06:03 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Geomorphologist View Post
    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).

    Thanks in advance.
    Post your code.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2010
    Posts
    11
    Thanks for your replay.
    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.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Geomorphologist View Post
    Thanks for your replay.
    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
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Mar 2010
    Posts
    11
    Quote Originally Posted by CaptainBlack View Post
    Code:
    --> (tanh(exp(log(3*pi)+log10(pi)*i))^3)/(7^8)   
                                                                                                         
    ans =                                                                                                                                                  
    
    1.7347e-007 +2.7977e-014i
    CB
    Danke!!!
    So obvious ...
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Writing a program in MATLAB
    Posted in the Math Software Forum
    Replies: 1
    Last Post: September 13th 2011, 05:08 AM
  2. Matlab Numerical Integration - Syntax/Style Query
    Posted in the Math Software Forum
    Replies: 2
    Last Post: March 9th 2010, 06:35 AM
  3. Help needed writing notes on a HP 50g
    Posted in the Calculators Forum
    Replies: 4
    Last Post: November 10th 2009, 10:13 PM
  4. Matlab counting syntax problem
    Posted in the Math Software Forum
    Replies: 3
    Last Post: October 23rd 2009, 05:25 AM
  5. Matlab: Syntax error in arguments to LM-function???
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 15th 2007, 03:37 AM

Search Tags


/mathhelpforum @mathhelpforum