<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Just starting this... Problem with matrices</title>
		<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices</link>
		<description>Posts in the discussion thread &quot;Just starting this... Problem with matrices&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Sat, 07 Mar 2026 12:01:10 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116256</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116256</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:53:32 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>If you get comfortable enough with it, you can consider getting certified.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116255</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116255</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:52:06 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Xphoenix is right that creating a separate list is faster, although it is more complicated. Here is the code for that:</p> <div class="code"> <pre><code>:cumSum(binomcdf(8,0→L1 :rand(9→L2 :SortA(L2,L1 :For(C,1,9 :L1(C→[A](1,C :End</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116251</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116251</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:35:30 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ans→[A](C,D is supposed to be :Ans→[A](1,C. I somehow copied it wrong from my calculator. :(</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116245</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116245</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:26:10 +0000</pubDate>
				<wikidot:authorName>Xphoenix</wikidot:authorName>				<wikidot:authorUserId>15004</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Strangely, I keep getting ERR:INVALID DIM when running that. The ERR is at the second to last line, when you store to the matrix. [A] is 9 by 9 according to the matrix menu. When I check C and D values, C is 9 and D is 10 (probably because of the last increment). When I change the line</p> <div class="code"> <pre><code>:For(D,1,C</code></pre></div> <br /> to <div class="code"> <pre><code>:For(D,1,C-1</code></pre></div> <br /> I get a diagonal of random numbers instead of a row. <p>On another note, isn't it smaller to create a list of the first 9 positive integers, shuffle it, and then store it to the first row of a matrix?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116244</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116244</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:24:12 +0000</pubDate>
				<wikidot:authorName>ChipChamp</wikidot:authorName>				<wikidot:authorUserId>89825</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>True, although it seems <em>much</em> more simple than C++.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116243</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116243</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:18:14 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Java is a fun language, although there's a lot to learn.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116242</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116242</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:13:03 +0000</pubDate>
				<wikidot:authorName>ChipChamp</wikidot:authorName>				<wikidot:authorUserId>89825</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I started learning it on my own about 2 - 3 years ago&#8230; But it's been kind of off and on, so I've probably only been programming in it for about 1 year.</p> <p>I prefer to use Java nowadays, though I've only been doing that for a few months. :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116240</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116240</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 06:06:03 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'm glad I could be of assistance. How long have you been doing C++?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116237</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116237</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 05:59:25 +0000</pubDate>
				<wikidot:authorName>ChipChamp</wikidot:authorName>				<wikidot:authorUserId>89825</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks! That did the trick.</p> <p>And thanks for the tip on Goto. I don't use it in C++ because it's frowned upon, but for some reason I decided to use it in this&#8230; Hmm&#8230;</p> <p>Anyway, thanks again! :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116233</guid>
				<title>Re: Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116233</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 05:36:56 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Welcome to TI-Basic Developer!</p> <p>Looking at your code, the problem is with your use of <a href="http://tibasicdev.wikidot.com/goto">Goto</a>. As a general rule of thumb, you should avoid using Goto unless absolutely necessary because its misuse causes <a href="http://tibasicdev.wikidot.com/memory-leaks">memory leaks</a> and <a href="http://tibasicdev.wikidot.com/spaghetti-code">spaghetti code</a>. In this case, the fix is to simply use an <a href="http://tibasicdev.wikidot.com/if">If-Then</a> conditional:</p> <div class="code"> <pre><code>:For(C,1,9 :randInt(1,9 :For(D,1,C :If Ans=[A](1,D:Then :1→D :randInt(1,9 :End:End :Ans→[A](1,C :End</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-44189#post-116206</guid>
				<title>Just starting this... Problem with matrices</title>
				<link>http://tibasicdev.wikidot.com/forum/t-44189/just-starting-this-problem-with-matrices#post-116206</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 03:28:48 +0000</pubDate>
				<wikidot:authorName>ChipChamp</wikidot:authorName>				<wikidot:authorUserId>89825</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Okay, well, I'm trying to recreate a very simple Sudoku game that I made with C++ using TI Basic. I haven't gotten very far because just putting random numbers in my matrix is driving me crazy&#8230; So far, this is what I have:</p> <p>(I'm using TI-83+)</p> <div class="code"> <pre><code>:AxesOff FnOff 0-&gt;Xmin 90-&gt;Xmax 0-&gt;Ymin 90-&gt;Ymax DelVar A:DelVar B:DelVar C:DelVar D:DelVar Z:Delvar F:0-&gt;H {9,9}-&gt;dim([A]) Fill(0,[A]) ClrDraw For(A,10,100,10) Horizontal A End For(B,10,100,10) Vertical B End Vertical 31 Vertical 61 Horizontal 29 Horizontal 61 Text(1,1,&quot;9 1-&gt;C For(C,1,9) Lbl 3 1-&gt;D randInt(1,9)-&gt;Z For(D,1,9) If Z=[A](1,D) Goto 3 End Z-&gt;[A](1,C) End Disp H Pause Disp [A] Pause</code></pre></div> <p>Right now, I'm just trying to get 1 random row of numbers 1 - 9, not repeating, in the matrix. The problem is that usually it only ads a few of the random numbers, and the rest are zero. Why doesn't it add random numbers to the entire row?</p> <p>Thanks for any help, it's been driving me crazy&#8230;</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>