<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aptech &#187; Answers for "Nested IF statements"</title>
	<atom:link href="http://www.aptech.com/questions/nested-if-statements/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aptech.com</link>
	<description></description>
	<lastBuildDate>Fri, 08 Feb 2013 19:12:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>By: aptech</title>
		<link>http://www.aptech.com/questions/nested-if-statements/#answer-2624</link>
		<comments>http://www.aptech.com/questions/nested-if-statements/#answer-2624#comments</comments>
		<pubDate>Fri, 30 Nov 2012 20:53:29 +0000</pubDate>
		<dc:creator>aptech</dc:creator>
		
		<guid isPermaLink="false">http://www.aptech.com/questions/nested-if-statements/#answer-2624</guid>
		<description><![CDATA[I am assuming that the IOFC references in the Matlab code are indexing into matrices. If they are actually function calls, replace &#8220;IOFC[i, t-3]&#8221; with &#8220;IOFC(i, t-3)&#8221;. for i(1, 5000, 1); for t(4, 15, 1); if IOFC[i, t-3] ≤ 6; &#8230; <a href="http://www.aptech.com/questions/nested-if-statements/#answer-2624">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am assuming that the IOFC references in the Matlab code are indexing into matrices. If they are actually function calls, replace &#8220;IOFC[i, t-3]&#8221; with &#8220;IOFC(i, t-3)&#8221;.</p>
<pre>
for i(1, 5000, 1);
   for t(4, 15, 1);
      if IOFC[i, t-3] ≤ 6;
         if IOFC[i, t-2] ≤ 6;
            phi[i, t] = 1;
         else;
            phi[i, t] = 0;
         endif;
      elseif IOFC[i, t-2] ≤ 4;
          phi[i, t] = 1;
      else;
         phi[i, t] = 0;
      endif;
   endfor;
endfor;
</pre>
<p>The main differences are that in GAUSS, <tt>if</tt> statements end with <tt>endif</tt> and <tt>for</tt> statements are ended with <tt>endfor</tt>. Also, <tt>for</tt> loops have the syntax:</p>
<pre>
for counter(start, stop, increment);
</pre>
<p>compared to:</p>
<pre>
for counter=start:end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aptech.com/questions/nested-if-statements/#answer-2624/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.aptech.com @ 2013-02-09 01:49:38 --