Results 1 to 3 of 3

Math Help - Matlab problem. Showing capital I and PI in results.

  1. #1
    Newbie
    Joined
    Feb 2010
    Posts
    2

    Matlab problem. Showing capital I and PI in results.

    Hi everybody. I've been trying to solve some really huge matrix equations in matlab. But, every time, Matlab shows me, besides number and symbols, capital letter "I" or "PI" in a solution.
    I need those equations later in other function for ODE45 solver. Ofcourse, ODE doesn't recognise "I" or "PI".

    Here it is some sequance from the result:

    1.0*(Kp3*x3 + Kv3*x6 + x11*(cos(- 2*x2 - 2/3*PI*(exp(-2*t^3) - 1)

    I define Kp3, x3, Kv3 etc. as symbols, but I didn't mention anywhere "PI" or "I".
    Does sombody know what is a problem here? And what should to avoide thise.
    Thank you for helping me.
    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 stnickola View Post
    Hi everybody. I've been trying to solve some really huge matrix equations in matlab. But, every time, Matlab shows me, besides number and symbols, capital letter "I" or "PI" in a solution.
    I need those equations later in other function for ODE45 solver. Ofcourse, ODE doesn't recognise "I" or "PI".

    Here it is some sequance from the result:

    1.0*(Kp3*x3 + Kv3*x6 + x11*(cos(- 2*x2 - 2/3*PI*(exp(-2*t^3) - 1)

    I define Kp3, x3, Kv3 etc. as symbols, but I didn't mention anywhere "PI" or "I".
    Does sombody know what is a problem here? And what should to avoide thise.
    Thank you for helping me.
    They are the square root of -1 and the symbolic constant \pi. If you eval them you will get the more usual values (I'm guessing here as I am not at a machine with the Symbolic tool box at present)

    CB
    Last edited by CaptainBlack; February 19th 2010 at 11:37 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2010
    Posts
    2
    Thank you CaptainBlack. But "eval" doesn't work here. I tried. I don't know what the problem is. Sometimes, I get really wierd solution, worse then previous one. But that depends on how big equation is. Maybe there is some problem with ram memory, I don't know.
    Real problem is simulation of one adaptive algoritham for 3DOF robot. When I put for desired trajectory, for instance, pi/3*sin(2*t)+3*cos(3*t), and something similar for other two joints, state space representation of the closed loop system is ok, without "I" or "PI", but the problem is for trajectory like pi/3*sin(2*t)+3*cos(3*t)*exp(2*t^3). The equation is too big for matlab command window so I had to use fprintf function. And in fprintf new file stands "I" or "PI", when I use pi instead 3.1416.
    Once, I got, in the middle of equation some wierd string array, something like "msccd" or something. But, after restarting computer, remaind only "I" or "PI".
    I don't have idea what can be a problem. But, of course, thank you again for helping me.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: November 28th 2011, 10:37 PM
  2. Simple profit + capital problem, need your help
    Posted in the Business Math Forum
    Replies: 3
    Last Post: June 3rd 2010, 12:04 AM
  3. Need help plotting results from a circuit in Matlab
    Posted in the Math Software Forum
    Replies: 0
    Last Post: February 15th 2010, 01:53 PM
  4. [SOLVED] Increasing decimal places in Matlab results
    Posted in the Math Software Forum
    Replies: 1
    Last Post: July 30th 2009, 05:53 AM
  5. Help, MatLab - Binomial results
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 9th 2009, 12:25 AM

Search Tags


/mathhelpforum @mathhelpforum