<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-28093388.post8818658482814032343..comments</id><updated>2009-10-28T11:04:24.462-07:00</updated><title type='text'>Comments on binarymillenium: Quick jmatio in Processing example</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://binarymillenium.com/feeds/8818658482814032343/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28093388/8818658482814032343/comments/default'/><link rel='alternate' type='text/html' href='http://binarymillenium.com/2009/08/quick-jmatio-in-processing-example.html'/><author><name>binarymillenium</name><uri>http://www.blogger.com/profile/17419830604356775608</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-28093388.post-6918263784432482243</id><published>2009-10-28T11:04:24.462-07:00</published><updated>2009-10-28T11:04:24.462-07:00</updated><title type='text'>For those, like I, new to MatLab, these steps may ...</title><content type='html'>For those, like I, new to MatLab, these steps may make it more clear what is going on...&lt;br /&gt;&lt;br /&gt;4. rename library/jamtio.jar to library/jmatio.jar&lt;br /&gt;5. Open MatLab and create an array called veh_x&lt;br /&gt;veh_x = [1.1,2.2,3.3,4.4]&lt;br /&gt;6. Save the veh_x array into a library dir file called veh_x.mat&lt;br /&gt;save(&amp;#39;\path\To\Your\libraryDir\veh_x.mat&amp;#39;, &amp;#39;veh_x&amp;#39;)&lt;br /&gt;7. Save (into Veh.java in the library dir), compile (javac -classpath jmatio.jar veh.java), &lt;br /&gt;and run (java -classpath .;jmatio.jar Veh) the following code:&lt;br /&gt;&lt;br /&gt;import com.jmatio.io.*;&lt;br /&gt;import com.jmatio.types.*;&lt;br /&gt;&lt;br /&gt;public class Veh {&lt;br /&gt;&lt;br /&gt; public static void main (String[] args) {&lt;br /&gt;  MatFileReader mfr = null;&lt;br /&gt;  try {&lt;br /&gt;      mfr = new MatFileReader(&amp;quot;matlab.mat&amp;quot; );&lt;br /&gt;  } catch (java.io.IOException e) {&lt;br /&gt;      e.printStackTrace();&lt;br /&gt;      System.exit(1);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  if (mfr != null) {&lt;br /&gt;            double[][] data = ((MLDouble)mfr.getMLArray( &amp;quot;veh_x&amp;quot; )).getArray();&lt;br /&gt;&lt;br /&gt;            System.out.println(&amp;quot;data.length: &amp;quot; + data.length + &amp;quot;.&amp;quot;);&lt;br /&gt;            for (int i = 0; i &amp;lt; data.length; i++) {&lt;br /&gt;                System.out.println(&amp;quot;data[&amp;quot;+i+&amp;quot;].length: &amp;quot; + data[i].length + &amp;quot;.&amp;quot;);&lt;br /&gt;                for (int j = 0; j &amp;lt; data[i].length; j++) {&lt;br /&gt;                    System.out.println(&amp;quot;data[&amp;quot;+j+&amp;quot;]: &amp;quot; + data[i][j]);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28093388/8818658482814032343/comments/default/6918263784432482243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28093388/8818658482814032343/comments/default/6918263784432482243'/><link rel='alternate' type='text/html' href='http://binarymillenium.com/2009/08/quick-jmatio-in-processing-example.html?showComment=1256753064462#c6918263784432482243' title=''/><author><name>Dennis</name><uri>http://www.blogger.com/profile/05365176508513108912</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://binarymillenium.com/2009/08/quick-jmatio-in-processing-example.html' ref='tag:blogger.com,1999:blog-28093388.post-8818658482814032343' source='http://www.blogger.com/feeds/28093388/posts/default/8818658482814032343' type='text/html'/></entry></feed>