<?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"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: matrix to array jitter</title>
		<atom:link href="http://cycling74.com/forums/topic/matrix-to-array-jitter/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/matrix-to-array-jitter/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 22:56:39 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/matrix-to-array-jitter/#post-58055</guid>
					<title><![CDATA[matrix to array jitter]]></title>
					<link>http://cycling74.com/forums/topic/matrix-to-array-jitter/#post-58055</link>
					<pubDate>Sun, 17 Jul 2011 19:10:40 +0000</pubDate>
					<dc:creator>evillordzenu</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Guys,</p>
<p>I&#8217;m working on a mxj patch that takes a float32 matrix with only one plane, but X and Y. I want to check each element in the matrix and perform calculations on the data. I was using getCell2d(), however that was very computationally strong. I then tried to copy this matrix to an array and work on the array instead. I would then go through this succesively with a for loop for X and Y. The code compiled, but when I run the code I get an arrayOutOfBounds exception error. The documentation does not explain how the matrix is changed into an array, so am I trying to access the array in the wrong fashion? I presumed it would be transfered into an array like array[640][480], but that does not seem to be the case. I&#8217;d really appriciate any help with this as it is driving me slowly towards insanity.</p>
<p>Here is the code I made.. In this case I am trying to keep track of the data in the array and output the lowest value.</p>
<p>import com.cycling74.max.*;<br />
import com.cycling74.jitter.*;<br />
import java.util.*;</p>
<p>public class matrixIf extends MaxObject {</p>
<p>	public void jit_matrix(String s)<br />
	{<br />
		JitterMatrix jm = new JitterMatrix(s);<br />
		int dim[] = jm.getDim();<br />
		int dimCap = dim[1]*dim[0];<br />
		float min = 0;<br />
		float[] test = {};<br />
		float tempFloat = 0;<br />
		int offset[] = new int[]{0,0};<br />
	    jm.copyMatrixToArray(test);<br />
	//	jm.copyVectorToArray(dimCap,offset,test,dim[1]*dim[0],0);</p>
<p>		for(int i=0;i<dim [0];i++)<br></dim>
		{</p>
<p>			for(int j=0;j<dim [0];j++)<br></dim>
				{ </p>
<p>				  tempFloat = test[j];<br />
					if(tempFloat < min)<br />
					{<br />
						min = tempFloat;</p>
<p>					}</p>
<p>				}</p>
<p>		}<br />
		outlet(0,min);<br />
		min = 0;</p>
<p>	outlet(0,min);<br />
	}</p>
<p>}</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/matrix-to-array-jitter/#post-208499</guid>
					<title><![CDATA[Re: matrix to array jitter]]></title>
					<link>http://cycling74.com/forums/topic/matrix-to-array-jitter/#post-208499</link>
					<pubDate>Sun, 17 Jul 2011 19:37:34 +0000</pubDate>
					<dc:creator>evillordzenu</dc:creator>

					<description>
						<![CDATA[
						<p>Just to add, I have checked how many elements are being populated and its returning 0, so I must be populating it in the wrong fashion.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/matrix-to-array-jitter/#post-208500</guid>
					<title><![CDATA[Re: matrix to array jitter]]></title>
					<link>http://cycling74.com/forums/topic/matrix-to-array-jitter/#post-208500</link>
					<pubDate>Sun, 17 Jul 2011 23:51:05 +0000</pubDate>
					<dc:creator>evillordzenu</dc:creator>

					<description>
						<![CDATA[
						<p>Figured it out guys, thanks anyway..</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

