Replacement expressionsExtracting equations from Piecewise expressionsComparing Mathematica expressions like...

What's a good word to describe a public place that looks like it wouldn't be rough?

Why zero tolerance on nudity in space?

When can a QA tester start his job?

How to deal with an incendiary email that was recalled

Is the timing of the US-North-Korea summit in Vietnam and Michael Cohen's testimony in Congress coincidence?

Why is working on the same position for more than 15 years not a red flag?

How do you funnel food off a cutting board?

How to say "Brexit" in Latin?

What is 6÷2×(1+2) =?

Is it possible to "destroy" a wallet?

What incentives do banks have to gather up loans into pools (backed by Ginnie Mae)and selling them?

Difference between i++ and (i)++ in C

Intern applicant asking for compensation equivalent to that of permanent employee

Why did Democrats in the Senate oppose the Born-Alive Abortion Survivors Protection Act (2019 S.130)?

How to limit sight distance to 1 KM

Why are these T-SQL jobs from different SQL Server instances executed on the same instance (AlwaysOn Availability Groups)

Is boss over stepping boundary/micromanaging?

How to make ice magic work from a scientific point of view?

Why exactly do action photographers need high fps burst cameras?

Can I string the DnD Starter Set campaign into another module, keeping the same characters?

Which one of these password policies are more secure?

I will be going to Sweden on business purpose .Can I visit London from Sweden and how much UK visa will cost?

How much mayhem could I cause as a sentient fish?

Why avoid shared user accounts?



Replacement expressions


Extracting equations from Piecewise expressionsComparing Mathematica expressions like diffSimplifying expressions involving SumPatterns of function-arguments in expressionsSelectively converting numerical strings to expressionsSimplify binary expressionsHow to I convert the following into a list of numbers?Handling long expressionsExpression replacement with variable exponentsDo replacement only on certain specific forms













3












$begingroup$


I have the following expressions:



R[1, 1] R[2, 1] R[3, 1] R[4, 1] 
sum[FF[3, ak[1] - ak[2], 1], EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]]


By what procedure can I convert such expressions into expression:



sum[R[1, 1], FF[3, ak[2] - ak[2], 1], R[2, 1] , EE[2, ak[2] - ak[3], 0], R[3, 1] , EE[2, ak[3] - ak[4], 0] , R[4, 1]]









share|improve this question









New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    Perhaps you should look at Riffle.
    $endgroup$
    – m_goldberg
    1 hour ago
















3












$begingroup$


I have the following expressions:



R[1, 1] R[2, 1] R[3, 1] R[4, 1] 
sum[FF[3, ak[1] - ak[2], 1], EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]]


By what procedure can I convert such expressions into expression:



sum[R[1, 1], FF[3, ak[2] - ak[2], 1], R[2, 1] , EE[2, ak[2] - ak[3], 0], R[3, 1] , EE[2, ak[3] - ak[4], 0] , R[4, 1]]









share|improve this question









New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    Perhaps you should look at Riffle.
    $endgroup$
    – m_goldberg
    1 hour ago














3












3








3





$begingroup$


I have the following expressions:



R[1, 1] R[2, 1] R[3, 1] R[4, 1] 
sum[FF[3, ak[1] - ak[2], 1], EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]]


By what procedure can I convert such expressions into expression:



sum[R[1, 1], FF[3, ak[2] - ak[2], 1], R[2, 1] , EE[2, ak[2] - ak[3], 0], R[3, 1] , EE[2, ak[3] - ak[4], 0] , R[4, 1]]









share|improve this question









New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I have the following expressions:



R[1, 1] R[2, 1] R[3, 1] R[4, 1] 
sum[FF[3, ak[1] - ak[2], 1], EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]]


By what procedure can I convert such expressions into expression:



sum[R[1, 1], FF[3, ak[2] - ak[2], 1], R[2, 1] , EE[2, ak[2] - ak[3], 0], R[3, 1] , EE[2, ak[3] - ak[4], 0] , R[4, 1]]






list-manipulation expression-manipulation






share|improve this question









New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









m_goldberg

86.8k872197




86.8k872197






New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









Piotr DrygaśPiotr Drygaś

161




161




New contributor




Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Piotr Drygaś is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • $begingroup$
    Perhaps you should look at Riffle.
    $endgroup$
    – m_goldberg
    1 hour ago


















  • $begingroup$
    Perhaps you should look at Riffle.
    $endgroup$
    – m_goldberg
    1 hour ago
















$begingroup$
Perhaps you should look at Riffle.
$endgroup$
– m_goldberg
1 hour ago




$begingroup$
Perhaps you should look at Riffle.
$endgroup$
– m_goldberg
1 hour ago










1 Answer
1






active

oldest

votes


















3












$begingroup$

expr = R[1, 1] R[2, 1] R[3, 1] R[4, 1] sum[FF[3, ak[1] - ak[2], 1], 
EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]];

expr /. a_ sum[b__] :> sum @@ Riffle[List @@ a, {b}]



sum[R[1, 1], FF[3, ak[1] - ak[2], 1], R[2, 1],
EE[2, ak[2] - ak[3], 0], R[3, 1], EE[2, ak[3] - ak[4], 0], R[4, 1]]







share|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    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/3.0/"u003ecc by-sa 3.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
    });


    }
    });






    Piotr Drygaś is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f192368%2freplacement-expressions%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $begingroup$

    expr = R[1, 1] R[2, 1] R[3, 1] R[4, 1] sum[FF[3, ak[1] - ak[2], 1], 
    EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]];

    expr /. a_ sum[b__] :> sum @@ Riffle[List @@ a, {b}]



    sum[R[1, 1], FF[3, ak[1] - ak[2], 1], R[2, 1],
    EE[2, ak[2] - ak[3], 0], R[3, 1], EE[2, ak[3] - ak[4], 0], R[4, 1]]







    share|improve this answer









    $endgroup$


















      3












      $begingroup$

      expr = R[1, 1] R[2, 1] R[3, 1] R[4, 1] sum[FF[3, ak[1] - ak[2], 1], 
      EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]];

      expr /. a_ sum[b__] :> sum @@ Riffle[List @@ a, {b}]



      sum[R[1, 1], FF[3, ak[1] - ak[2], 1], R[2, 1],
      EE[2, ak[2] - ak[3], 0], R[3, 1], EE[2, ak[3] - ak[4], 0], R[4, 1]]







      share|improve this answer









      $endgroup$
















        3












        3








        3





        $begingroup$

        expr = R[1, 1] R[2, 1] R[3, 1] R[4, 1] sum[FF[3, ak[1] - ak[2], 1], 
        EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]];

        expr /. a_ sum[b__] :> sum @@ Riffle[List @@ a, {b}]



        sum[R[1, 1], FF[3, ak[1] - ak[2], 1], R[2, 1],
        EE[2, ak[2] - ak[3], 0], R[3, 1], EE[2, ak[3] - ak[4], 0], R[4, 1]]







        share|improve this answer









        $endgroup$



        expr = R[1, 1] R[2, 1] R[3, 1] R[4, 1] sum[FF[3, ak[1] - ak[2], 1], 
        EE[2, ak[2] - ak[3], 0], EE[2, ak[3] - ak[4], 0]];

        expr /. a_ sum[b__] :> sum @@ Riffle[List @@ a, {b}]



        sum[R[1, 1], FF[3, ak[1] - ak[2], 1], R[2, 1],
        EE[2, ak[2] - ak[3], 0], R[3, 1], EE[2, ak[3] - ak[4], 0], R[4, 1]]








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        kglrkglr

        186k10203422




        186k10203422






















            Piotr Drygaś is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Piotr Drygaś is a new contributor. Be nice, and check out our Code of Conduct.













            Piotr Drygaś is a new contributor. Be nice, and check out our Code of Conduct.












            Piotr Drygaś is a new contributor. Be nice, and check out our Code of Conduct.
















            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%2f192368%2freplacement-expressions%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

            Benedict Cumberbatch Contingut Inicis Debut professional Premis Filmografia bàsica Premis i...

            Monticle de plataforma Contingut Est de Nord Amèrica Interpretacions Altres cultures Vegeu...

            Escacs Janus Enllaços externs Menú de navegacióEscacs JanusJanusschachBrainKing.comChessV