Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I need a help about Mathematica

  1. May 30, 2010 #1
    Greetings from Turkey,

    Friends, I have a big problem about Math. the problem is that I have three equations having 16th orders and I got 16 amount roots which have both complex conj. and real parts by solving these equations with the code of the NSolve, up to here It is all ok, but I would like to eliminate Complex and just print real roots. Now 2 reals and 14 complexes roots are printed on my programing.

    in second step; as seen figure-1; after eliminating complexes roots, I would like to put each real root into the form of the "figure-2".

    Already thanks dear friends...

    Attached Files:

  2. jcsd
  3. May 30, 2010 #2
    I am looking forward to ur responses...
  4. Jun 6, 2010 #3
    Solve[ArcTan[#]*360/Pi==T1, T1]& /@ DeleteCases[Tan[T1/2]/.ROOTS, _Complex]

    OR exactly the same thing written in a different way

    T1ROOTS = ReplaceAll[Tan[T1/2], ROOTS];
    realT1ROOTS = DeleteCases[T1ROOTS, _Complex];
    f[x_] := Solve[ArcTan[x]*360/Pi == T1, T1];
    Map[f, realT1ROOTS]

    Then repeat this for T2 and for T3
    Last edited: Jun 6, 2010
  5. Jun 7, 2010 #4

    I am so thankful to you, it is a very good expression to me and I am brink on maneging to these thanks to you,

    Last thing that I need is that I would like to put each T1, T2 and T3 into some matries and result it. I tried this, but I could not. pls help about this.

    I mean that these result are put into matries algebra which will result in some cordinates in x-y-z,

    I uploaded what I tried.

    Thanks already

    Attached Files:

  6. Jun 7, 2010 #5
    Rxx1 = {{1,0,0}, {0,Cos[#1 Degree],-Sin[#2 Degree]}, {0,Sin[#3 Degree],
    Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Astra]];
    Rxx2 = {{1,0,0}, {0,Cos[#1 Degree],-Sin[#2 Degree]}, {0,Sin[#3 Degree],
    Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Vectra]];
    Rxx3 = {{1,0,0}, {0,Cos[#1 Degree], -Sin[#2 Degree]}, {0,Sin[#3 Degree],
    Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Zafira]];
  7. Jun 8, 2010 #6
    Brother, thanks for everything,

    I would like to have a suggest from you about the points (x,y,z) found by matries algebra in the last step, I mean how I ought to put the points into 3-D, namely; the plotting ought to look very very nice:) maybe it is plooted in 2-D.

    What do you suggest me?
  8. Jun 8, 2010 #7
    I do not see your result so I am not sure. Perhaps this example will help

    points=Table[{Sin[t],Cos[t],t/(2 Pi)},{t,0,4Pi,Pi/12}]

    to see some sample points. Then


    Change PointSize, ViewPoint and ImageSize to best show your points.

    To plot in 2D

    ListPlot[Map[Drop[#, -1] &, points]]

    which removes the z and then plots xy in 2D

    If this is not helpful then show the complete result you must plot
  9. Jun 8, 2010 #8

    my screen result is below.

    Attached Files:

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook