<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Macro + plotting + do question. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139221#M28112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. Two hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. you have to increment %do loops with integers&lt;/P&gt;&lt;P&gt;2. I think proc plot will require that you plot two variables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Dec 2014 00:15:22 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2014-12-07T00:15:22Z</dc:date>
    <item>
      <title>Macro + plotting + do question.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139220#M28111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am having trouble to generate code for an assignment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is the Questions:&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;Write macro to print and plot the exponential function of a given “base” starting in the range “start” – to – “end” calculated by increment “incr”. &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-left: 72.0pt;"&gt;&lt;STRONG style="color: black; font-size: 11.0pt; font-family: 'Courier New';"&gt;Add the title indicating what function you are plotting, in what range and ny what increment. &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 36.0pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 36.0pt; text-indent: 36.0pt;"&gt;&lt;STRONG style="color: black; font-size: 11.0pt; font-family: 'Courier New';"&gt;Run your macro as:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 72.0pt;"&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;exp_plot&lt;/EM&gt;&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, -&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 72.0pt;"&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;exp_plot&lt;/EM&gt;&lt;/STRONG&gt;(-&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, -&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 36.0pt;"&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;exp_plot&lt;/EM&gt;&lt;/STRONG&gt;(-&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, -&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 14.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the code i have so far:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro exp_plot(base,start,end,incr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data plot1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=&amp;amp;start %to &amp;amp;end %by &amp;amp;incr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result=&amp;amp;base**&amp;amp;i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc plot data=plot1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot result;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%mend exp_plot;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%exp_plot(.5, -10, 10,.5)&lt;/P&gt;&lt;P&gt;%exp_plot(-.5, -10, 10,.5)&lt;/P&gt;&lt;P&gt;%exp_plot(-.5, -10, 10,.5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can someone please point me in the right direction?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Dec 2014 23:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139220#M28111</guid>
      <dc:creator>a_gomesd</dc:creator>
      <dc:date>2014-12-06T23:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Macro + plotting + do question.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139221#M28112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. Two hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. you have to increment %do loops with integers&lt;/P&gt;&lt;P&gt;2. I think proc plot will require that you plot two variables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2014 00:15:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139221#M28112</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-12-07T00:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro + plotting + do question.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139222#M28113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Arthur, I managed to figure it out thanks to your hints. If I understand correctly, you cannot use non-integer values to increment in a %do loop therefore the problem is in the question as it is the question that requests us to use the value of 0.5 for incremental.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2014 02:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139222#M28113</guid>
      <dc:creator>a_gomesd</dc:creator>
      <dc:date>2014-12-07T02:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Macro + plotting + do question.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139223#M28114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are you using %do in a data step, use a regular do loop instead. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a proc plot? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2014 03:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139223#M28114</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-07T03:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Macro + plotting + do question.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139224#M28115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As &lt;A __default_attr="255172" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; said you can use a regular do loop in your data step and a regular do loop CAN use a fractional increment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2014 04:41:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-plotting-do-question/m-p/139224#M28115</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-12-07T04:41:03Z</dc:date>
    </item>
  </channel>
</rss>

