How to store values in an array?

Can I say "fingers" when referring to toes?

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

Quoting Keynes in a lecture

Review your own paper in Mathematics

What is the highest possible scrabble score for placing a single tile

What (the heck) is a Super Worm Equinox Moon?

Can you use Vicious Mockery to win an argument or gain favours?

Did the UK lift the requirement for registering SIM cards?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

Shouldn’t conservatives embrace universal basic income?

How to convince somebody that he is fit for something else, but not this job?

Is there a nicer/politer/more positive alternative for "negates"?

How could a planet have erratic days?

Strong empirical falsification of quantum mechanics based on vacuum energy density?

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

Make a Bowl of Alphabet Soup

Does the reader need to like the PoV character?

Is this toilet slogan correct usage of the English language?

Why should universal income be universal?

Has any country ever had 2 former presidents in jail simultaneously?

The Digit Triangles

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

Why can't the Brexit deadlock in the UK parliament be solved with a plurality vote?

Why Shazam when there is already Superman?



How to store values in an array?














0
















How to store a calculated value in array?




zz(1) = ( xx(1) + yy(1) )/2




fpevalzz(counter){(xx(counter)+yy(counter))/2} NOT working




documentclass{beamer}
usepackage{siunitx,amsmath}
usepackage{xparse,xfp}

ExplSyntaxOn
NewDocumentCommand{newarray}{m}
{
seq_new:c { l_hafid_array_#1_seq }
cs_new:cpn { #1 } ##1
{
seq_item:cn { l_hafid_array_#1_seq } { ##1 }
}
}
NewDocumentCommand{readarray}{mm}
{
seq_set_split:cnn { l_hafid_array_#1_seq } { & } { #2 }
}
cs_generate_variant:Nn seq_set_split:Nnn { c }

NewExpandableDocumentCommand{sumarray}{O{15}m}
{
fp_eval:n { round( seq_use:cn { l_hafid_array_#2_seq } { + }, #1 ) }
}

ExplSyntaxOff

begin{document}

newarray{xx}
readarray{xx}{1&2&3&4&5}

newarray{yy}
readarray{yy}{6&7&8&9&10}

begin{frame}
begin{table}[]
begin{tabular}{cccc}
No & xx & yy & zz \ hline
1 & xx{1} & yy{1} & fpeval{(xx{1}+yy{1})/2} \
2 & xx{2} & yy{2} & fpeval{(xx{2}+yy{2})/2} \
3 & xx{3} & yy{3} & \
4 & xx{4} & yy{4} & \
5 & xx{5} & yy{5} & \ hline
end{tabular}
end{table}
end{frame}

%newarray{zz}
%readarray{xx}{0&0&0&0&0}
newcountcounter
counter=5
loop
fpevalzz(counter){(xx(counter)+yy(counter))/2}
advance counter by -1
unlessifnum counter<1
repeat

end{document}








share



























    0
















    How to store a calculated value in array?




    zz(1) = ( xx(1) + yy(1) )/2




    fpevalzz(counter){(xx(counter)+yy(counter))/2} NOT working




    documentclass{beamer}
    usepackage{siunitx,amsmath}
    usepackage{xparse,xfp}

    ExplSyntaxOn
    NewDocumentCommand{newarray}{m}
    {
    seq_new:c { l_hafid_array_#1_seq }
    cs_new:cpn { #1 } ##1
    {
    seq_item:cn { l_hafid_array_#1_seq } { ##1 }
    }
    }
    NewDocumentCommand{readarray}{mm}
    {
    seq_set_split:cnn { l_hafid_array_#1_seq } { & } { #2 }
    }
    cs_generate_variant:Nn seq_set_split:Nnn { c }

    NewExpandableDocumentCommand{sumarray}{O{15}m}
    {
    fp_eval:n { round( seq_use:cn { l_hafid_array_#2_seq } { + }, #1 ) }
    }

    ExplSyntaxOff

    begin{document}

    newarray{xx}
    readarray{xx}{1&2&3&4&5}

    newarray{yy}
    readarray{yy}{6&7&8&9&10}

    begin{frame}
    begin{table}[]
    begin{tabular}{cccc}
    No & xx & yy & zz \ hline
    1 & xx{1} & yy{1} & fpeval{(xx{1}+yy{1})/2} \
    2 & xx{2} & yy{2} & fpeval{(xx{2}+yy{2})/2} \
    3 & xx{3} & yy{3} & \
    4 & xx{4} & yy{4} & \
    5 & xx{5} & yy{5} & \ hline
    end{tabular}
    end{table}
    end{frame}

    %newarray{zz}
    %readarray{xx}{0&0&0&0&0}
    newcountcounter
    counter=5
    loop
    fpevalzz(counter){(xx(counter)+yy(counter))/2}
    advance counter by -1
    unlessifnum counter<1
    repeat

    end{document}








    share

























      0












      0








      0









      How to store a calculated value in array?




      zz(1) = ( xx(1) + yy(1) )/2




      fpevalzz(counter){(xx(counter)+yy(counter))/2} NOT working




      documentclass{beamer}
      usepackage{siunitx,amsmath}
      usepackage{xparse,xfp}

      ExplSyntaxOn
      NewDocumentCommand{newarray}{m}
      {
      seq_new:c { l_hafid_array_#1_seq }
      cs_new:cpn { #1 } ##1
      {
      seq_item:cn { l_hafid_array_#1_seq } { ##1 }
      }
      }
      NewDocumentCommand{readarray}{mm}
      {
      seq_set_split:cnn { l_hafid_array_#1_seq } { & } { #2 }
      }
      cs_generate_variant:Nn seq_set_split:Nnn { c }

      NewExpandableDocumentCommand{sumarray}{O{15}m}
      {
      fp_eval:n { round( seq_use:cn { l_hafid_array_#2_seq } { + }, #1 ) }
      }

      ExplSyntaxOff

      begin{document}

      newarray{xx}
      readarray{xx}{1&2&3&4&5}

      newarray{yy}
      readarray{yy}{6&7&8&9&10}

      begin{frame}
      begin{table}[]
      begin{tabular}{cccc}
      No & xx & yy & zz \ hline
      1 & xx{1} & yy{1} & fpeval{(xx{1}+yy{1})/2} \
      2 & xx{2} & yy{2} & fpeval{(xx{2}+yy{2})/2} \
      3 & xx{3} & yy{3} & \
      4 & xx{4} & yy{4} & \
      5 & xx{5} & yy{5} & \ hline
      end{tabular}
      end{table}
      end{frame}

      %newarray{zz}
      %readarray{xx}{0&0&0&0&0}
      newcountcounter
      counter=5
      loop
      fpevalzz(counter){(xx(counter)+yy(counter))/2}
      advance counter by -1
      unlessifnum counter<1
      repeat

      end{document}








      share















      How to store a calculated value in array?




      zz(1) = ( xx(1) + yy(1) )/2




      fpevalzz(counter){(xx(counter)+yy(counter))/2} NOT working




      documentclass{beamer}
      usepackage{siunitx,amsmath}
      usepackage{xparse,xfp}

      ExplSyntaxOn
      NewDocumentCommand{newarray}{m}
      {
      seq_new:c { l_hafid_array_#1_seq }
      cs_new:cpn { #1 } ##1
      {
      seq_item:cn { l_hafid_array_#1_seq } { ##1 }
      }
      }
      NewDocumentCommand{readarray}{mm}
      {
      seq_set_split:cnn { l_hafid_array_#1_seq } { & } { #2 }
      }
      cs_generate_variant:Nn seq_set_split:Nnn { c }

      NewExpandableDocumentCommand{sumarray}{O{15}m}
      {
      fp_eval:n { round( seq_use:cn { l_hafid_array_#2_seq } { + }, #1 ) }
      }

      ExplSyntaxOff

      begin{document}

      newarray{xx}
      readarray{xx}{1&2&3&4&5}

      newarray{yy}
      readarray{yy}{6&7&8&9&10}

      begin{frame}
      begin{table}[]
      begin{tabular}{cccc}
      No & xx & yy & zz \ hline
      1 & xx{1} & yy{1} & fpeval{(xx{1}+yy{1})/2} \
      2 & xx{2} & yy{2} & fpeval{(xx{2}+yy{2})/2} \
      3 & xx{3} & yy{3} & \
      4 & xx{4} & yy{4} & \
      5 & xx{5} & yy{5} & \ hline
      end{tabular}
      end{table}
      end{frame}

      %newarray{zz}
      %readarray{xx}{0&0&0&0&0}
      newcountcounter
      counter=5
      loop
      fpevalzz(counter){(xx(counter)+yy(counter))/2}
      advance counter by -1
      unlessifnum counter<1
      repeat

      end{document}






      fp





      share












      share










      share



      share










      asked 2 mins ago









      sandusandu

      3,67942856




      3,67942856






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          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
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480828%2fhow-to-store-values-in-an-array%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX 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.


          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%2ftex.stackexchange.com%2fquestions%2f480828%2fhow-to-store-values-in-an-array%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

          El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

          Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

          Castillo d'Acher Características Menú de navegación