Modify real part and leaves imaginary part unchangedpresenting a real number as real instead of imaginaryHow to eliminate the zero real part of a purely imaginary number?Solve equations real and imaginary part separatelyDecomposing a complex numbers equation into its real and imaginary partListplot imaginary part of complex numbersContour plot of the imaginary portion of a function given the real part is positiveImaginary part of complex number, nothing works?

How a square wave is generated?

Is trying to learn day trading a complete waste of time?

Finishing pre-cooked prime rib, day-of?

Why use an adjective after a noun?

5yrs old being bossy... Is this too much or tolerable at this age?

Updated: Questions on implementing Builder design pattern

Behaviour of verb that looks pronomial but doesn't have a "se" entry in the dictionary?

As of 2019, why do mountaineering courses still teach how to use a paper map?

How to prevent humanity from using alien spaceships and technology exclusively?

Why my vim doesn't support hex color code?

Does the three-clause BSD license hinder academic citations?

Taking a Switch on vacation from EU to USA. What region eshop will I be able to access?

Peptide bond formation in acidic and basic amino acids

Can I use baking powder in place of baking soda for dipping pretzels?

smallest number obtainable from 2020

Creating outer glow effect depending on the graduated symbology color of a shapefile - QGIS

Should I take a side in an external player conflict, or let my game die?

Carlsen beat a high ranking GM with 1 Nh3. Conclusions?

"Can't open display" when using `scp`

Where should I place my fictional continent in the South Pacific?

Why are the 4th and 7th scale degrees removed from the major scale to make the Pentatonic scale?

Sum of primes under a certain number

If a very huge Earthquake occured anywhere on Earth could waves emerge to come together again on the opposite side?

What range of heights are allowed for wall receptacles?



Modify real part and leaves imaginary part unchanged


presenting a real number as real instead of imaginaryHow to eliminate the zero real part of a purely imaginary number?Solve equations real and imaginary part separatelyDecomposing a complex numbers equation into its real and imaginary partListplot imaginary part of complex numbersContour plot of the imaginary portion of a function given the real part is positiveImaginary part of complex number, nothing works?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;

.everyonelovesstackoverflowposition:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;








8















$begingroup$


How can I flip the sign of the real part but not affect the imaginary part of a complex number:



a+bi => -a + bi



Example list:



list = -0.282095 + 0.282095 I, -0.27254 + 0.291336 I, 
-0.262018 + 0.300835 I, -0.250437 + 0.310542 I


expected:



0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 
0.262018 + 0.300835 I, 0.250437 + 0.310542 I


So it's "similar" to conjugate but works on the real not imaginary.










share|improve this question









$endgroup$





















    8















    $begingroup$


    How can I flip the sign of the real part but not affect the imaginary part of a complex number:



    a+bi => -a + bi



    Example list:



    list = -0.282095 + 0.282095 I, -0.27254 + 0.291336 I, 
    -0.262018 + 0.300835 I, -0.250437 + 0.310542 I


    expected:



    0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 
    0.262018 + 0.300835 I, 0.250437 + 0.310542 I


    So it's "similar" to conjugate but works on the real not imaginary.










    share|improve this question









    $endgroup$

















      8













      8









      8





      $begingroup$


      How can I flip the sign of the real part but not affect the imaginary part of a complex number:



      a+bi => -a + bi



      Example list:



      list = -0.282095 + 0.282095 I, -0.27254 + 0.291336 I, 
      -0.262018 + 0.300835 I, -0.250437 + 0.310542 I


      expected:



      0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 
      0.262018 + 0.300835 I, 0.250437 + 0.310542 I


      So it's "similar" to conjugate but works on the real not imaginary.










      share|improve this question









      $endgroup$




      How can I flip the sign of the real part but not affect the imaginary part of a complex number:



      a+bi => -a + bi



      Example list:



      list = -0.282095 + 0.282095 I, -0.27254 + 0.291336 I, 
      -0.262018 + 0.300835 I, -0.250437 + 0.310542 I


      expected:



      0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 
      0.262018 + 0.300835 I, 0.250437 + 0.310542 I


      So it's "similar" to conjugate but works on the real not imaginary.







      complex






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 1 at 22:41









      leon365leon365

      5892 silver badges7 bronze badges




      5892 silver badges7 bronze badges























          3 Answers
          3






          active

          oldest

          votes


















          29

















          $begingroup$

          -Conjugate[list]

          (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I,
          0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





          share|improve this answer










          $endgroup$













          • $begingroup$
            This is not even a Mathematica but a Math answer. I like it
            $endgroup$
            – infinitezero
            Oct 2 at 12:06


















          9

















          $begingroup$

          list /. Complex[x_, y_] :> Complex[-x, y]



          0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I,
          0.250437 + 0.310542 I, 2, 3 I







          share|improve this answer










          $endgroup$









          • 1




            $begingroup$
            This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
            $endgroup$
            – Ruslan
            Oct 3 at 5:20











          • $begingroup$
            Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
            $endgroup$
            – Suba Thomas
            Oct 3 at 14:21











          • $begingroup$
            Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
            $endgroup$
            – Ruslan
            Oct 3 at 14:23


















          2

















          $begingroup$

          f[z_] = -Re[z] + I Im[z]
          f[list]

          (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





          share|improve this answer










          $endgroup$















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "387"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f207188%2fmodify-real-part-and-leaves-imaginary-part-unchanged%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            29

















            $begingroup$

            -Conjugate[list]

            (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I,
            0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





            share|improve this answer










            $endgroup$













            • $begingroup$
              This is not even a Mathematica but a Math answer. I like it
              $endgroup$
              – infinitezero
              Oct 2 at 12:06















            29

















            $begingroup$

            -Conjugate[list]

            (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I,
            0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





            share|improve this answer










            $endgroup$













            • $begingroup$
              This is not even a Mathematica but a Math answer. I like it
              $endgroup$
              – infinitezero
              Oct 2 at 12:06













            29















            29











            29







            $begingroup$

            -Conjugate[list]

            (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I,
            0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





            share|improve this answer










            $endgroup$



            -Conjugate[list]

            (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I,
            0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)






            share|improve this answer













            share|improve this answer




            share|improve this answer










            answered Oct 1 at 22:48









            WReachWReach

            57k2 gold badges126 silver badges225 bronze badges




            57k2 gold badges126 silver badges225 bronze badges














            • $begingroup$
              This is not even a Mathematica but a Math answer. I like it
              $endgroup$
              – infinitezero
              Oct 2 at 12:06
















            • $begingroup$
              This is not even a Mathematica but a Math answer. I like it
              $endgroup$
              – infinitezero
              Oct 2 at 12:06















            $begingroup$
            This is not even a Mathematica but a Math answer. I like it
            $endgroup$
            – infinitezero
            Oct 2 at 12:06




            $begingroup$
            This is not even a Mathematica but a Math answer. I like it
            $endgroup$
            – infinitezero
            Oct 2 at 12:06













            9

















            $begingroup$

            list /. Complex[x_, y_] :> Complex[-x, y]



            0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I,
            0.250437 + 0.310542 I, 2, 3 I







            share|improve this answer










            $endgroup$









            • 1




              $begingroup$
              This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
              $endgroup$
              – Ruslan
              Oct 3 at 5:20











            • $begingroup$
              Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
              $endgroup$
              – Suba Thomas
              Oct 3 at 14:21











            • $begingroup$
              Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
              $endgroup$
              – Ruslan
              Oct 3 at 14:23















            9

















            $begingroup$

            list /. Complex[x_, y_] :> Complex[-x, y]



            0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I,
            0.250437 + 0.310542 I, 2, 3 I







            share|improve this answer










            $endgroup$









            • 1




              $begingroup$
              This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
              $endgroup$
              – Ruslan
              Oct 3 at 5:20











            • $begingroup$
              Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
              $endgroup$
              – Suba Thomas
              Oct 3 at 14:21











            • $begingroup$
              Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
              $endgroup$
              – Ruslan
              Oct 3 at 14:23













            9















            9











            9







            $begingroup$

            list /. Complex[x_, y_] :> Complex[-x, y]



            0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I,
            0.250437 + 0.310542 I, 2, 3 I







            share|improve this answer










            $endgroup$



            list /. Complex[x_, y_] :> Complex[-x, y]



            0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I,
            0.250437 + 0.310542 I, 2, 3 I








            share|improve this answer













            share|improve this answer




            share|improve this answer










            answered Oct 1 at 22:47









            Suba ThomasSuba Thomas

            5,08911 silver badges20 bronze badges




            5,08911 silver badges20 bronze badges










            • 1




              $begingroup$
              This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
              $endgroup$
              – Ruslan
              Oct 3 at 5:20











            • $begingroup$
              Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
              $endgroup$
              – Suba Thomas
              Oct 3 at 14:21











            • $begingroup$
              Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
              $endgroup$
              – Ruslan
              Oct 3 at 14:23












            • 1




              $begingroup$
              This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
              $endgroup$
              – Ruslan
              Oct 3 at 5:20











            • $begingroup$
              Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
              $endgroup$
              – Suba Thomas
              Oct 3 at 14:21











            • $begingroup$
              Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
              $endgroup$
              – Ruslan
              Oct 3 at 14:23







            1




            1




            $begingroup$
            This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
            $endgroup$
            – Ruslan
            Oct 3 at 5:20





            $begingroup$
            This assumes that all entries are truly Complex[_,_]. But for a list -0.282095 + 0.282095 I, -0.3445, which also contains only complex numbers (although one of them happens to be purely real, and even have Real head), this won't work correctly.
            $endgroup$
            – Ruslan
            Oct 3 at 5:20













            $begingroup$
            Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
            $endgroup$
            – Suba Thomas
            Oct 3 at 14:21





            $begingroup$
            Agreed. This solution is for complex numbers of the form a + b i that was asked in the question. To include real numbers it needs to be modified to Complex[x_,y_]:>Complex[-x,y], x_:>-x.
            $endgroup$
            – Suba Thomas
            Oct 3 at 14:21













            $begingroup$
            Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
            $endgroup$
            – Ruslan
            Oct 3 at 14:23




            $begingroup$
            Actually this would also break for "complex" number like e.g. 1.234+0I, which actually collapses to a Real
            $endgroup$
            – Ruslan
            Oct 3 at 14:23











            2

















            $begingroup$

            f[z_] = -Re[z] + I Im[z]
            f[list]

            (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





            share|improve this answer










            $endgroup$


















              2

















              $begingroup$

              f[z_] = -Re[z] + I Im[z]
              f[list]

              (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





              share|improve this answer










              $endgroup$
















                2















                2











                2







                $begingroup$

                f[z_] = -Re[z] + I Im[z]
                f[list]

                (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)





                share|improve this answer










                $endgroup$



                f[z_] = -Re[z] + I Im[z]
                f[list]

                (* 0.282095 + 0.282095 I, 0.27254 + 0.291336 I, 0.262018 + 0.300835 I, 0.250437 + 0.310542 I *)






                share|improve this answer













                share|improve this answer




                share|improve this answer










                answered Oct 2 at 18:26









                Michael SeifertMichael Seifert

                7,75415 silver badges43 bronze badges




                7,75415 silver badges43 bronze badges































                    draft saved

                    draft discarded















































                    Thanks for contributing an answer to Mathematica Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f207188%2fmodify-real-part-and-leaves-imaginary-part-unchanged%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown









                    Popular posts from this blog

                    Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

                    How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

                    Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü