<?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>Mark Mikofski &#8211; Undocumented Matlab</title>
	<atom:link href="https://undocumentedmatlab.com/articles/tag/mark-mikofski/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Wed, 27 Aug 2014 12:26:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>Inter-Matlab data transfer with memcached</title>
		<link>https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=inter-matlab-data-transfer-with-memcached</link>
					<comments>https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 27 Aug 2014 12:26:57 +0000</pubDate>
				<category><![CDATA[Guest bloggers]]></category>
		<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Mark Mikofski]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4969</guid>

					<description><![CDATA[<p>The memcached library can be used to transfer data between separate Matlab processes (sessions). </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached">Inter-Matlab data transfer with memcached</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/serializing-deserializing-matlab-data" rel="bookmark" title="Serializing/deserializing Matlab data">Serializing/deserializing Matlab data </a> <small>Matlab does not provide a documented manner to serialize data into a byte stream, but we can do this with some undocumented functionality. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/simulink-data-dictionary" rel="bookmark" title="Simulink Data Dictionary">Simulink Data Dictionary </a> <small>Simulink contains undocumented public API for access to its data dictionary functionality. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/accessing-plot-brushed-data" rel="bookmark" title="Accessing plot brushed data">Accessing plot brushed data </a> <small>Plot data brushing can be accessed programmatically using very simple pure-Matlab code...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/sparse-data-math-info" rel="bookmark" title="Sparse data math info">Sparse data math info </a> <small>Matlab contains multiple libraries for handling sparse data. These can report very detailed internal info. ...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><i>Once again I welcome guest blogger <a target="_blank" rel="nofollow" href="http://poquitopicante.blogspot.com">Mark Mikofski</a>. Mark has written here last year about <a target="_blank" href="/articles/jgit-matlab-integration/">JGIT-Matlab integration</a> and earlier this year on <a target="_blank" href="/articles/json-matlab-integration">JSON-Matlab integration</a>. Today, Mark shows how to use the well-known open-source <a target="_blank" rel="nofollow" href="http://memcached.org">memcached</a> library for data transfer between separate Matlab processes. Readers are also referred to <a target="_blank" rel="nofollow" href="http://poquitopicante.blogspot.co.il/2014/08/intro-memcached-memcached.html">Mark&#8217;s article</a> on his blog. I have already written about <a target="_blank" href="/articles/explicit-multi-threading-in-matlab-part4#spawning">various ways to communicate between separate Matlab processes</a> &#8211; today&#8217;s article is an important complement to these methods.</i></p>
<h3 id="downloads">Downloads</h3>
<p><a target="_blank" rel="nofollow" href="http://stringpool.com/memcached-tutorials"><img decoding="async" class="alignright" alt="Stringpool's memcached tutorial" src="http://stringpool.com/wp-content/uploads/2013/08/memcached.jpg" title="Stringpool's memcached tutorial" width="240" height="172" /></a>The <a href="http://memcached.org">memcached</a> open-source library is great for sending objects from process to process. It is typically used to cache large data objects from databases or in a distributed environment, but we can also use it as a simple distributed shared memory system, which stores data in key-value pairs (as in a hashtable).<br />
I was able to use memcached to set and retrieve objects from two different instances of Matlab. Both the Java and .NET variants of memcached can be used for this. memcached requires two components: server and client: The server comes precompiled, while the client needs to be compiled by us.<br />
The memcached server was compiled by Trond Norbye from Couchbase (previously Membase and Northscale) for <a href="http://downloads.northscale.com/memcached-1.4.5-x86.zip">32-bit</a> and <a href="http://downloads.northscale.com/memcached-1.4.5-amd64.zip">64-bit</a> Windows OS. See <a href="#windows_service">below</a> how to run it as a service using the Python PyWin32 package.<br />
I compiled Windows binaries of memcached-client libraries for both the Java and .NET using Java-1.7 and Visual Studio 2010 and zipped them up <a href="https://dl.dropboxusercontent.com/u/19049582/memcached.zip" target="">here</a>.<br />
Note: additional (non-memcached) shared-memory implementations used in Matlab include Joshua Dillon&#8217;s <i><a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/28572-sharedmatrix">sharedmatrix</a></i> (also see <a target="_blank" rel="nofollow" href="http://smlv.cc.gatech.edu/2010/08/27/shared-memory-in-matlab/">here</a>), and Kevin Stone&#8217;s <i><a target="_blank" rel="nofollow" href="http://bengal.missouri.edu/~kes25c/SharedMemory-Windows.zip">SharedMemory</a></i> utilities, which use POSIX shared-memory and the <a target="_blank" rel="nofollow" href="http://boost.org/doc/libs/1_55_0/doc/html/interprocess/managed_memory_segments.html">Boost IPC library</a>. Rice University&#8217;s <i><a target="_blank" rel="nofollow" href="http://infoscience.epfl.ch/record/55784/files/keleher94treadmark.pdf">TreadMarks</a></i> library is another example of a shared-memory approach that has been used with Matlab, in the <i><a target="_blank" rel="nofollow" href="http://polaris.cs.uiuc.edu/matmarks/">MATmarks</a></i> package (note that the current availability of MATmarks is unclear).<br />
<span id="more-4969"></span></p>
<h3 id="dotnet">.NET</h3>
<p>We use the <a href="http://downloads.northscale.com/memcached-1.4.5-amd64.zip">Memcached server version 1.4.5 patched for 64-bit Windows</a>, precompiled by Trond Norbye from Couchbase (previously Membase and Northscale).<br />
For the Memcached .NET client, download the <a href="http://sourceforge.net/projects/memcacheddotnet/" target="_blank"><code>Memcached.ClientLibrary</code> port of <code>com.meetup.memcached</code></a> from SourceForge, and then compile using Microsoft Visual Studio 2010 C#, Release/AnyCPU configuration. Since the original project files were for MSVC-8, MSVC-10 starts a conversion wizard that first backed up the previous project files and then creates a new MSVC-10 project, including a new solution file. I then build the <code>clientlib_2.0</code> project from the MSVC-10 IDE GUI using &#8220;build&#8221; from the menu, and voila: I got a new DLL.<br />
Usage in Matlab is as follows:</p>
<ol>
<li>Start the memcached server:
<pre lang="dos">C:\> C:\path\to\memcached.exe -vv</pre>
</li>
<li>Do this on both MATLAB instances:
<pre lang="matlab">
asm = NET.addAssembly('C:\full\path\to\Memcached.ClientLibrary.dll');
pool = Memcached.ClientLibrary.SockIOPool.GetInstance();
pool.SetServers({'127.0.0.1:11211'});
pool.Initialize;
mc = Memcached.ClientLibrary.MemcachedClient();
</pre>
</li>
<li>On MATLAB instance #1:
<pre lang="matlab">
mc.Set('name','mark')
</pre>
</li>
<li>On MATLAB instance #2:
<pre lang="matlab">
>> myName = mc.Get('name')
myName =
mark
</pre>
</li>
</ol>
<h3 id="Java">Java</h3>
<p>MATLAB and memcached also works perfectly with the original meetup.com Java version that the .NET version was ported from. The commands are exactly the same, but the Apache logger is not cleaned up for the non-bench/test sources (with <code>isErrorEnabled()</code>, etc. see <a href="https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html"><code>jlog4</code> documentaion</a>), so you always get this error message:</p>
<blockquote style="color: red"><p>
log4j:WARN No appenders could be found for logger (com.meetup.memcached.SockIOPool).<br />
log4j:WARN Please initialize the log4j system properly.
</p></blockquote>
<p>Because there are log calls in the MemcachedClient and SockIOPool files that never have <code>BasicConfiguration.configure()</code> or set any <code>jlog4.<properties></code> like the <code>appender</code> hence the error. Of course they never meant for log messages to be displayed when deployed, so wrapping with <code>isErrorEnabled()</code> like the .NET version does would be better.<br />
The Java package is called <code>com.meetup.memcached</code>. We should build it ourselves from the <a href="https://github.com/gwhalin/Memcached-Java-Client">Github source</a>. The jar from the <a href="http://mvnrepository.com/artifact/com.whalin/Memcached-Java-Client">Maven repository</a> didn&#8217;t work (attempting to start the sock I/O pool raised several Java errors due to missing includes), and differs a bit from the GitHub repo.</p>
<pre lang="sh">
$ /c/Program\ Files/Java/jdk1.7.0_55/bin/javac.exe -verbose -classpath ../lib/log4j.jar -sourcepath com/meetup/memcached/ -source 1.6 -target 1.6 -d ../bin/ com/meetup/memcached/*.java
$ /c/Program\ Files/Java/jdk1.7.0_55/bin/jar.exe -cvf MeetupMemcached.jar com/
</pre>
<p>To use in Matlab, first, start the memcached server, then start sock I/O pools and memcached clients on both Matlab instances:</p>
<pre lang="matlab">
>> javaaddpath('C:\full\path\to\MeetupMemcached.jar');
>> pool = com.meetup.memcached.SockIOPool.getInstance();
>> pool.setServers({'127.0.0.1:11211'});
>> pool.initialize;
>> mc = com.meetup.memcached.MemcachedClient;
>> mc.set('name','mark'); % on 1st instance/process
>> myName = mc.get('name') % on 2nd instance/process
myName =
mark
</pre>
<h3 id="other">Other clients</h3>
<ul>
<li><a href="https://code.google.com/p/xmemcached/">xmemcached</a> &#8211; Github:killme2008, Google Code project and Maven repo</li>
<p>The Xmemcached client works well. It is the most recently updated. There are jar files on the releases page of the GitHub repo. Here is an example from the 2.0.0 release from this April. The example is from the google.code wiki User Guide in English.</p>
<pre lang="matlab">
>> javaaddpath('C:\full\path\to\xmemcached-2.0.0.jar');
>> addr = net.rubyeye.xmemcached.utils.AddrUtil.getAddresses('localhost:11211')
addr =
[localhost/127.0.0.1:11211]
>> builder = net.rubyeye.xmemcached.XMemcachedClientBuilder(addr)
builder =
net.rubyeye.xmemcached.XMemcachedClientBuilder@7ef6a26
>> mc = builder.build()
log4j:WARN No appenders could be found for logger (net.rubyeye.xmemcached.XMemcachedClient).
log4j:WARN Please initialize the log4j system properly.
mc =
net.rubyeye.xmemcached.XMemcachedClient@275e6ce5
>> mc.set('name',0,'mark')
ans =
     1
>> myName = mc.get('name')
myName =
mark
</pre>
<li><a href="https://www.nuget.org/packages/EnyimMemcached/">Enyim</a> &#8211; NuGet and Github:enyim<br />
I couldn&#8217;t get this assembly to load as built, I always got an &#8220;Strong Name Validation Failed&#8221; error, perhaps because I am on a 64-bit machine, but using MSVC express.</li>
<li><a href="https://code.google.com/p/spymemcached/">spymemcached</a> &#8211; Github:dustin, Google Code project and Maven repo<br />
I also couldn&#8217;t get this to work. Even though I could make an array of Java socket objects using <code>InetSocket</code> the connection was always refused even though the memcached server was operating on the specified port.</li>
</ul>
<h3 id="windows_service">memcached server as Windows service</h3>
<p>This <a href="https://gist.github.com/mikofski/e1e1b953cdf42f6170d4#file-memcached_service-py">Gist</a> uses Python PyWin32 <a href="http://starship.python.net/~skippy/win32/Downloads.html"><code>win32service</code></a> to install, remove, configure, start and stop the memcached server.</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached">Inter-Matlab data transfer with memcached</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/serializing-deserializing-matlab-data" rel="bookmark" title="Serializing/deserializing Matlab data">Serializing/deserializing Matlab data </a> <small>Matlab does not provide a documented manner to serialize data into a byte stream, but we can do this with some undocumented functionality. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/simulink-data-dictionary" rel="bookmark" title="Simulink Data Dictionary">Simulink Data Dictionary </a> <small>Simulink contains undocumented public API for access to its data dictionary functionality. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/accessing-plot-brushed-data" rel="bookmark" title="Accessing plot brushed data">Accessing plot brushed data </a> <small>Plot data brushing can be accessed programmatically using very simple pure-Matlab code...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/sparse-data-math-info" rel="bookmark" title="Sparse data math info">Sparse data math info </a> <small>Matlab contains multiple libraries for handling sparse data. These can report very detailed internal info. ...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>JSON-Matlab integration</title>
		<link>https://undocumentedmatlab.com/articles/json-matlab-integration?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=json-matlab-integration</link>
					<comments>https://undocumentedmatlab.com/articles/json-matlab-integration#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 26 Mar 2014 09:00:48 +0000</pubDate>
				<category><![CDATA[Guest bloggers]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Mark Mikofski]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4738</guid>

					<description><![CDATA[<p>JSON can easily be integrated in Matlab to achieve cross-platform standard API. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/json-matlab-integration">JSON-Matlab integration</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/jgit-matlab-integration" rel="bookmark" title="JGit-Matlab integration">JGit-Matlab integration </a> <small>JGit source-control integration package can easily be integrated in Matlab. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-installation-woes" rel="bookmark" title="Matlab installation woes">Matlab installation woes </a> <small>Matlab has some issues when installing a new version. This post discusses some of them and how to overcome them....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached" rel="bookmark" title="Inter-Matlab data transfer with memcached">Inter-Matlab data transfer with memcached </a> <small>The memcached library can be used to transfer data between separate Matlab processes (sessions). ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab" rel="bookmark" title="Using Groovy in Matlab">Using Groovy in Matlab </a> <small>Groovy code can seamlessly be run from within Matlab. ...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><i>I would like to once again welcome guest blogger <a target="_blank" rel="nofollow" href="http://poquitopicante.blogspot.com">Mark Mikofski</a>. Mark has written here last year about <a target="_blank" href="/articles/jgit-matlab-integration/">JGIT-Matlab integration</a> (p.s., in the recently-released R2014a, MathWorks added <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/simulink/ug/set-up-git-source-control.html">GIT support to Simulink projects</a>, although for some reason not to Matlab projects). Today, Mark discusses how to integrate JSON with Matlab.</i></p>
<h3 id="intro">What is JSON</h3>
<p>It&#8217;s often necessary to save objects and arrays to a file, for lots of reasons. In Matlab, you would just save the desired objects in a mat-file, but that&#8217;s a binary format that in general only Matlab can read. One reason you might want to cache objects is to pass to a non-Matlab API. True there are libraries to import mat-files (for example: <a target="_blank" rel="nofollow" href="http://sourceforge.net/projects/jmatio/">JMatIO</a>), but there are already accepted standards for passing objects such as XML and JSON (JavaScript Object Notation, <a target="_blank" rel="nofollow" href="http://json.org">http://json.org</a>) that most APIs readily understand. Both of these methods attempt to serialize data into a text based format that limits the types of objects they can contain. Because sometimes the API is a human being who needs to read and edit the file, one of the JSON&#8217;s goals is to be &#8220;easy for humans to read and write&#8221;.<br />
Here&#8217;s a sample of a JSON object:</p>
<pre lang='javascript'>
{
    "students": ["Dick", "Jane"],
    "assignments": ["essay", "term paper"]
    "scores": {
        "essay": {"Dick": 86, "Jane": 88},
        "term paper":  {"Dick": 89, "Jane": 87}
    },
    "cool": {"Dick": true, "Jane": true},
    "misc": null
}
</pre>
<p>Many web services, such as Twitter, use JSON in their APIs, because another JSON goal is to be &#8220;easy for machines to parse and generate&#8221;. JSON is based on the <a target="_blank" rel="nofollow" href="http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf">JavaScript ECMA standard</a> in which it is native, and is extremely well documented.<br />
<span id="more-4738"></span></p>
<h3 id="primer">JSON Primer</h3>
<p>The documentation on json.org&#8217;s main page includes several train-track style graphics that best explain JSON usage, but here is a short primer:</p>
<ul>
<li>There are two main types of JSON objects, a <code>JSONObject</code> and a <code>JSONArray</code>.</li>
<li>A <code>JSONObject</code> is enclosed in braces and consists of a collection of unordered key-value pairs separated by a commas. Each key-value pair is separated by a colon, with the key given before the value. In the example above, &#8220;students&#8221; is a key and its value is the <code>JSONArray</code> [&#8220;Dick&#8221;, &#8220;Jane&#8221;]. Keys must be strings, as explained below.</li>
<li>A <code>JSONArray</code> is enclosed in brackets and is ordered array of valid JSON types.</li>
<li>Items in a <code>JSONObject</code> or <code>JSONArray</code> may be one of 7 types: string, number, <code>JSONObject</code>, <code>JSONArray</code>, true, false, or null.</li>
<li>Strings are always enclosed in double-quotes and may contain backslashed escapes such as newline (\n), tab (\t), double-quotes (\&#8221;), backslash (\\) etc.</li>
<li>Numbers can be integers, floats, and scientific notation.</li>
<li>JSON interprets <i>true</i> and <i>false</i> as booleans (or logicals), and null as nothing.</li>
</ul>
<p>There are several options to use JSON in Matlab, depending on what JSON parsing interface you wish to use. Matlab can use external libraries such as Java, .NET and C that allow us to use different implementations of the standard, including the original Java-based implementation by <a target="_blank" rel="nofollow" href="http://en.wikipedia.org/wiki/Douglas_Crockford">Douglas Crockford</a> himself, the primary author of JavaScript of which JSON is a subset. A full list of JSON implementations is given on the main website along with its documentation. Here is a short list of some libraries:</p>
<ul>
<li><a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/33381-jsonlab-a-toolbox-to-encode-decode-json-files-in-matlab-octave">JSONlab</a> (Matlab) (also on <a target="_blank" rel="nofollow" href="http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?jsonlab">SourceForge</a>)</li>
<li><a target="_blank" rel="nofollow" href="http://www.json.org/java/index.html">org.json</a> (Java). <i>Note: this link is now defunct; here&#8217;s <a href="https://web.archive.org/web/20160118153748/http://www.json.org/java/index.html" rel="nofollow" target="_blank">an archived link</a></i></li>
<li><a target="_blank" rel="nofollow" href="http://james.newtonking.com/json">Json.NET</a> (.NET)</li>
<li><a target="_blank" rel="nofollow" href="http://www.codeproject.com/Articles/159450/fastJSON">fastJSON</a> (.NET)</li>
</ul>
<h3 id="JSONlab">JSONlab</h3>
<p>The most popular and mature Matlab implementation is JSONlab, which was started in 2011 by a Qianqian Fang, a medical researcher at Massachusetts General Hospital. It is available on the <a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/33381-jsonlab-a-toolbox-to-encode-decode-json-files-in-matlab-octave">Matlab File Exchange</a>, on <a target="_blank" rel="nofollow" href="http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?jsonlab">SourceForge</a> and via a Subversion repository. The latest version is 1.0beta that includes BSON, a variant of JSON used in MongoDB, which compresses JSON data into a binary format. JSONlab is based in part on earlier JSON-Matlab implementations that are now deprecated: <a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/20565-json-parser">JSON Parser</a> (2009) by Joel Feenstra, <a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/23393-another-json-parser">another JSON Parser</a> (2011) by François Glineur, and <a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/25713-highly-portable-json-input-parser">Highly portable JSON-input parser</a> (2009) by Nedialko.<br />
JSONlab converts both strings and files given by filename directly into Matlab structures and vice-versa. For example:</p>
<pre lang='matlab'>
>> loadjson('{"this": "that", "foo": [1,2,3], "bar": ["a", "b", "c"]}')
ans =
    this: 'that'
    foo: [1 2 3]
    bar: {'a'  'b'  'c'}
>> s = struct('this', {'a', 'b'}, 'that', {1,2})
s =
1x2 struct array with fields:
    this
    that
>> j = savejson(s)
j =
{
    "s": [
        {
            "this": "a",
            "that": 1
        },
        {
            "this": "b",
            "that": 2
        }
    ]
}
</pre>
<p>JSONlab will nest structures as necessary and translates the JSON types into the appropriate Matlab types and vice-versa. JSONlab is well documented, easy and fast. It is reliable because it is well-maintained, has been around for several years and has many users. It is open source and issues and contributions are welcomed.</p>
<h3 id="org.json">org.json (aka JSON-Java)</h3>
<p>This is the Java implementation of JSON by the creator JSON and JavaScript, Douglas Crockford. This version is very well documented and under active development, but since there are no releases and only one branch, it could be considered the development branch. There are several other popular Java implementations listed on the JSON.org website.<br />
The JSON library itself is called <i>json.jar</i> or <i>org.json.jar</i>. The easiest way to use it in Matlab is to add it to your java class path and then use it as if you were calling Java code. I put together a <a target="_blank" rel="nofollow" href="https://gist.github.com/mikofski/2492355">gist of examples and links</a> for your reference. In particular take a look at <i>orgJSONdemo.m</i> which has several examples of creating JSON objects and then using them. I addition, take a look at this <a target="_blank" rel="nofollow" href="https://www.mathworks.com/matlabcentral/newsreader/view_thread/330728">CSSM newsgroup thread</a>.<br />
How to add the jar file to your java class path depends on your version of Matlab: starting in R2012b, Matlab switched from using <i>classpath.txt</i> in your Matlab workspace to using <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/matlab/matlab_external/bringing-java-classes-and-methods-into-matlab-workspace.html#f111065"><i>javaclasspath.txt</i></a>, which is much easier (however, <a target="_blank" href="/articles/matlab-installation-take-2/#comment-110967">see here</a>). Make a file in your Matlab workspace, usually <i>/home/MATLAB</i> or <i>/home/documents/matlab</i> (e.g. on windows 7: <i>c:\users\you\documents\matlab</i>), called “<i>javaclasspath.txt</i>” and put the full path to your jar file. For example if you put the jar file in a MATLAB/JSON/ folder, then put the following line (on windows 7) in <i>javaclasspath.txt</i>:<br />
the path specified in the javaclasspath.txt file should be the path to the actual jar file, so assuming your jar is called json.jar then you would put this path in your file:</p>
<blockquote><p>C:\Users\your-user-name\Documents\MATLAB\JSON\json.jar</p></blockquote>
<p>You must restart Matlab before this change takes effect. An alternate method is to load the jar file dynamically to Matlab&#8217;s Java classpath, using <i><b>javaaddpath</b>(&#8216;path\to\json.jar&#8217;)</i>.<br />
All this is pretty straight-forward in Matlab R2013b and newer, which use Java 7. <i>json.org</i> was implemented in Java 7 as <a target="_blank" rel="nofollow" href="http://docs.oracle.com/javaee/7/api/javax/json/package-summary.html">javax.json</a>, and so can be used with Matlab R2013b and newer. Matlab versions R2013a and earlier use Java 6, so another Java implementation must be used. You can either download a pre-compiled JAR file <a target="_blank" rel="nofollow" href="http://dl.dropbox.com/u/19049582/JSON.jar">from my dropbox</a>, or compile the source files on your system as follows:</p>
<ol>
<li>Confirm the version of Java used in Matlab by typing
<pre lang='matlab'>
>> version -java
Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
</pre>
</li>
<li>Download and install the corresponding Java JDK from Oracle or OpenJDK</li>
<li>Obtain the source by cloning the repository or <a target="_blank" rel="nofollow" href="http://json.org/java">downloading a tar/zip-ball</a></li>
<li>If necessary, extract the source then browse to the &#8220;src&#8221; folder</li>
<li>Compile the source into a class files from the command line:
<pre lang='matlab'>C:\> C:\Program Files\Java\jdk1.7.0_45\bin\javac -verbose -sourcepath org\json\ -source 1.6 -target 1.6 -d ..\bin\ org\json\*.java org\json\zip\*.java</pre>
</li>
<li>Browse the created &#8220;bin&#8221; folder</li>
<li>Archive the class files into a jar file:
<pre lang='matlab'>C:\> C:\Program Files\Java\jdk1.7.0_45\bin\jar -cvf JSON.jar org\</pre>
</li>
<li>Add the new jar file to the Matlab static Java classpath, which will depend on what version of Matlab you have:
<ol>
<li><a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/releases/R2012a/techdoc/matlab_external/f4863.html#f4867">Matlab &lt;= 2012a</a>:
<ul>
<li>Find the system classpath.txt file by typing:
<pre lang='matlab'>
>> [matlabroot '\toolbox\local\classpath.txt']
C:\Program Files\MATLAB\R2012a\toolbox\local\classpath.txt
</pre>
</li>
<li>Copy the classpath to your working folder and append the path the jar file to the end. Use hash marks to comment lines.<br />
&nbsp;</li>
</ul>
</li>
<li><a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/releases/R2012b/matlab/matlab_external/bringing-java-classes-and-methods-into-matlab-workspace.html#f4867">Matlab >= 2012b</a>: create a new file called &#8220;javaclasspath.txt&#8221; in your working folder with the path of the new jar file in it. Use hash marks for comments.<br />
&nbsp;</li>
</ol>
</li>
<li>Restart Matlab to enable the jar file within Matlab.</li>
</ol>
<p>Using the Java library is the same as using any Java library in Matlab. One nice feature is that tabbing after typing &#8220;<code>object.</code>&#8221; gives a pop-up list of available properties and methods, including inherited ones. Here are some simple usage examples:</p>
<pre lang='matlab'>
>> j1 = org.json.JSONObject('{"this": "that", "foo": [1,2,3], "bar": ["a", "b", "c"]}')
>> j2 = j1.put('hello', 'world')
j2 =
{"hello":"world", "foo":[1,2,3], "bar":["a","b","c"], "this":"that"}
>> w = j1.getString('hello')
ans =
world
</pre>
<p>Watch out: the output is actually a <code>java.lang.String</code> object; use <i><b>char</b>()</i> to convert it into a Matlab string:</p>
<pre lang='matlab'>
>> char(w)
ans =
world
</pre>
<p>There is no easy way to convert a <code>JSONArray</code> to an array, so you can either loop over it, or convert it to a string and parse it. Note that <code>JSONArray</code> indexes start from 0, as in Java (contrary to Matlab indexes, which start at 1)</p>
<pre lang='matlab'>
>> f = j1.get('foo')
f =
[1,2,3]
>> for n = 1:f.length,  fa(n)=f.get(n-1);  end
>> fa
fa =
     1     2     3
</pre>
<h3 id="others">Json.NET and fastJSON</h3>
<p>These libraries require you to add add the path of the .NET dll to Matlab using <i><b>NET.addAssembly</b></i>. For fastJSON, since binaries are not available, you will also need to compile the .NET dll. I&#8217;ll leave it to the reader to investigate further, independently.</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/json-matlab-integration">JSON-Matlab integration</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/jgit-matlab-integration" rel="bookmark" title="JGit-Matlab integration">JGit-Matlab integration </a> <small>JGit source-control integration package can easily be integrated in Matlab. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-installation-woes" rel="bookmark" title="Matlab installation woes">Matlab installation woes </a> <small>Matlab has some issues when installing a new version. This post discusses some of them and how to overcome them....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/inter-matlab-data-transfer-with-memcached" rel="bookmark" title="Inter-Matlab data transfer with memcached">Inter-Matlab data transfer with memcached </a> <small>The memcached library can be used to transfer data between separate Matlab processes (sessions). ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab" rel="bookmark" title="Using Groovy in Matlab">Using Groovy in Matlab </a> <small>Groovy code can seamlessly be run from within Matlab. ...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/json-matlab-integration/feed</wfw:commentRss>
			<slash:comments>18</slash:comments>
		
		
			</item>
		<item>
		<title>JGit-Matlab integration</title>
		<link>https://undocumentedmatlab.com/articles/jgit-matlab-integration?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jgit-matlab-integration</link>
					<comments>https://undocumentedmatlab.com/articles/jgit-matlab-integration#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 10 Jul 2013 18:00:49 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Guest bloggers]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Mark Mikofski]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3973</guid>

					<description><![CDATA[<p>JGit source-control integration package can easily be integrated in Matlab. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/jgit-matlab-integration">JGit-Matlab integration</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/json-matlab-integration" rel="bookmark" title="JSON-Matlab integration">JSON-Matlab integration </a> <small>JSON can easily be integrated in Matlab to achieve cross-platform standard API. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-java-interface-using-static-control" rel="bookmark" title="Matlab-Java interface using a static control">Matlab-Java interface using a static control </a> <small>The switchyard function design pattern can be very useful when setting Matlab callbacks to Java GUI controls. This article explains why and how....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/spicing-up-the-matlab-editor" rel="bookmark" title="Spicing up the Matlab Editor">Spicing up the Matlab Editor </a> <small>Matlab's Editor and Workspace can be enhanced quite significantly using an open-source utility. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab" rel="bookmark" title="Using Groovy in Matlab">Using Groovy in Matlab </a> <small>Groovy code can seamlessly be run from within Matlab. ...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><i>I would like to introduce guest blogger <a target="_blank" rel="nofollow" href="poquitopicante.blogspot.com">Mark Mikofski</a>, of SunPower Corp. Mark has developed the JGit4MATLAB utility, which can be used to integrate Matlab with the popular JGit open-source version-control system.</i></p>
<h3 id="Intro">Introduction</h3>
<p><figure style="width: 150px" class="wp-caption alignright"><img decoding="async" alt="JGit logo" src="https://undocumentedmatlab.com/images/jgit_logo.png" title="JGit logo" width="150" height="148" /><figcaption class="wp-caption-text">JGit logo</figcaption></figure> <a target="_blank" rel="nofollow" href="http://eclipse.org/jgit/">JGit</a> is an open-source Java implementation of <a target="_blank" rel="nofollow" href="http://git-scm.com/">Git</a>, a popular distributed version control system. Since Matlab is essentially a Java interpreter, JGit is an obvious candidate for integrating Git into Matlab. Luckily, JGit also comes with a porcelain class that has the most popular commands conveniently packaged. This is the starting point for <a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/41348-jgit4matlab">JGit4MATLAB</a> &#8211; a thin Matlab wrapper utility on the Matlab File Exchange.<br />
The first step is to download and install <i><b>JGit4MATLAB</b></i> in your Matlab path. The first time that the JGit Matlab class is called, it downloads the latest version of <i>org.eclipse.jgit.jar</i>, adds it to Matlab&#8217;s static Java classpath and makes a backup of the existing <i>javaclasspath.txt</i> file as <i>javaclasspath.JGitSaved</i>. Matlab must then be restarted for the changes to the static Java class path to take effect. From now on, you can use the commands in the JGit Matlab class or the <i>jgit.m</i> wrapper function. These use basic JGit commands, which shall be described below:<br />
Most of the important JGit methods are encapsulated in the Matlab JGit wrapper class and <i>jgit.m</i> function, but you can also use them directly if you wish. The Matlab wrapper currently supports ADD, BRANCH, CHECKOUT, CLONE, COMMIT, DIFF, INIT, LOG, MERGE &#038; STATUS, but there are many more in <code>org.eclipse.jgit.api.Git</code> that you can use directly. In fact you don&#8217;t really need to use the wrapper at all if you don&#8217;t want to &#8211; all you really need is the JAR file, which the wrapper downloads and installs for you. You can also download the JAR file independently from <a target="_blank" rel="nofollow" href="http://eclipse.org/jgit/download/">here</a> (latest only, which is what <i><b>JGit4MATLAB</b></i> does), or <a target="_blank" rel="nofollow" href="http://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit">here</a> (latest and previous releases). If you&#8217;re using <i><b>JGit4MATLAB</b></i>, you can update the JAR file to the latest version at will, by issuing <code>JGit.downloadJGitJar('@JGit\org.eclipse.jgit.jar')</code>.<br />
<span id="more-3973"></span><br />
The most basic Git commands are clone, init, add and commit. Let us explore how to use JGit&#8217;s &#8220;<a target="_blank" rel="nofollow" href="http://download.eclipse.org/jgit/docs/latest/apidocs/org/eclipse/jgit/api/Git.html">Git-Porcelain API</a>&#8221; class in Matlab to perform these tasks.</p>
<h3 id="Clone">Clone and Init</h3>
<p><i>Clone</i> and <i>Init</i> are both class methods of the Git-Porcelain API class and return a <code>Command</code> API class object, which is what nearly all of the Git-Porcelain methods do:</p>
<pre lang='matlab'>
import org.eclipse.jgit.api.Git   % import the package
cloneCMD = Git.cloneRepository;   % return a CloneCommand object
URI = 'git://github.com/mikofski/JGit4Matlab.git';   % a Git repository
cloneCMD.setURI(URI)   % set the repository to clone
g = cloneCMD.call;   % clone the repository
</pre>
<p>or more compactly:</p>
<pre lang='matlab'>g = org.eclipse.jgit.api.Git.cloneRepository.setURI(URI).call;</pre>
<p>The <i>call</i> method executes the command with the options and arguments set by the other methods. Calling the <i>clone</i> method also returns a Git instance. The <a target="_blank" rel="nofollow" href="http://download.eclipse.org/jgit/docs/latest/apidocs/org/eclipse/jgit/api/CloneCommand.html">full API for the <code>CloneCommand</code> class</a> lists all the possible options and arguments for cloning. One option lets you set an optional progress monitor; there are some already included in JGit, but unfortunately, they use the carriage return (or &#8216;\r&#8217;) escape sequence which in Windows is the same as a newline (<a target="_blank" href="/articles/command-window-text-manipulation/">read here</a>). So, I implemented a customized <a target="_blank" rel="nofollow" href="https://github.com/mikofski/JGit4MATLAB/tree/master/%40JGit/MATLABProgressMonitor/src/org/eclipse/jgit/lib"><code>ProgressMonitor</code> class</a> for Matlab that uses backspace (or &#8216;\b&#8217;) instead.<br />
<i>Init</i> is very similar to <i>clone</i>:</p>
<pre lang='matlab'>g = org.eclipse.jgit.api.Git.init.call;</pre>
<h3 id="Author">Configuring author information</h3>
<p>Before moving on, it is important to set the &#8220;author&#8221; and &#8220;email&#8221; fields in the Git config. JGit will use your computer&#8217;s info if you provide nothing. You probably want to set these values globally, so the place to put them is in your $HOME folder in the &#8220;<i>.gitconfig</i>&#8221; file.</p>
<pre lang='matlab'>
file = java.io.File(fullfile(getenv('home'),'.gitconfig'));
gitconfig = org.eclipse.jgit.storage.file.FileBasedConfig(file, org.eclipse.jgit.util.FS.DETECTED);
gitconfig.setString('user',[], 'name','John Doe');       % place your name in here
gitconfig.setString('user',[], 'email','john@doe.com');  % place your email in here
gitconfig.save;
</pre>
<p>Hopefully your commits will all have the right name and email address in them from now on.</p>
<h3 id="Workflow">Typical JGit Workflow</h3>
<p>Now that you have a Git repository, you will want to start working with it. The typical workflow is to create a feature branch in which to work. But first JGit needs a Git instance. If you saved it from cloning or initializing a new repo then good for you! But if you need to recreate it, just pass the constructor a <a target="_blank" rel="nofollow" href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html"><code>File</code></a> object that points to the .git folder inside your Git repo:<br />
<figure style="width: 237px" class="wp-caption alignright"><img fetchpriority="high" decoding="async" alt="JGit workflow" src="https://undocumentedmatlab.com/images/jgit_flow.png" title="JGit workflow" width="237" height="537" /><figcaption class="wp-caption-text">JGit workflow</figcaption></figure></p>
<pre lang='matlab'>
file = java.io.File(fullfile('path', 'to', 'repo', '.git'));
g = org.eclipse.jgit.api.Git.open(file);
g.checkout.setCreateBranch(true).setName('newbranch').call;
</pre>
<p>Now you are no longer on the &#8220;master&#8221; branch, which is usually reserved for buildable/deployable code. Start working. But before you do too much, commit your work to your branch:</p>
<pre lang='matlab'>
g.add.addFilepattern('file1.m').addFilepattern('file2.m').call;
g.commit.setMessage('initial dump').call;
</pre>
<p><figure style="width: 485px" class="wp-caption alignleft"><img loading="lazy" decoding="async" alt="JGit commit log" src="https://undocumentedmatlab.com/images/jgit_glog.png" title="JGit commit log" width="485" height="498" /><figcaption class="wp-caption-text">JGit commit log</figcaption></figure><br />
All commits should have a message, so you know what work was completed in that commit. Branch and commit frequently. You can always clean them up later. There are lots of options for adding and committing files, so look at the API&#8217;s <a target="_blank" rel="nofollow" href="http://download.eclipse.org/jgit/docs/latest/apidocs/org/eclipse/jgit/api/AddCommand.html"><code>AddCommand</code></a> and <a target="_blank" rel="nofollow" href="http://download.eclipse.org/jgit/docs/latest/apidocs/org/eclipse/jgit/api/CommitCommand.html"><code>CommitCommand</code></a> classes.<br />
Everything else is pretty much the same as above: Get a Git instance; create a command; set the options; and finally call the command:</p>
<pre lang='matlab'>
file = java.io.File(fullfile('path', 'to', 'repo', '.git'));
g = org.eclipse.jgit.api.Git.open(file);
r = g.getRepository;  % a Repository instance can be very useful
g.status.call;
g.log.call;
g.checkout.setName('master').call;
g.merge.include(r.resolve('newbranch')).call;
g.push.call;
g.pull.call;
</pre>
<p>Note: <a target="_blank" rel="nofollow" href="http://download.eclipse.org/jgit/docs/latest/apidocs/org/eclipse/jgit/lib/Repository.html#resolve(java.lang.String)"><code>Repository.resolve()</code></a> is one of the most powerful methods.<br />
The JGit log window on the left can be gotten using <i>glog</i> &#8211; the standalone JGit command line log GUI (slightly similar to <i>gitk</i>) that can be downloaded as a binary for systems with /bin/sh from the <a target="_blank" rel="nofollow" href="http://www.eclipse.org/jgit/">eclipse site</a> (same place as the jar download).<br />
Some tricks can be gleaned by what little work I&#8217;ve done so far on the <i><b>JGit4MATLAB</b></i> wrapper on the Matlab File Exchange. I&#8217;ll be happy to answer whatever questions I can there, or comments here. I&#8217;m also happy to accept pull requests on <a target="_blank" rel="nofollow" href="https://github.com/mikofski/JGit4Matlab">Github</a>, of course using <i><b>JGit4MATLAB</b></i>!</p>
<h3 id="Authentication">Authentication</h3>
<p>You can only use an SSH paired keys to authenticate remote repositories, the keys must **not** have a pass-phrase, they must be in the openSSH format and they must be in <i>$HOME/.ssh</i>. <a target="_blank" rel="nofollow" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTYgen</a> let&#8217;s you do all of this, so it&#8217;s really not an issue. Of course you can still use remotes that do not require authentication with no problems.<br />
All commands that deal with remotes and that require authentication, e.g. CLONE, FETCH, PULL, PUSH, will only work</p>
<ul>
<li>with SSH</li>
<li>with *no* passphrase</li>
<li>with keys in the openSSH format</li>
<li>with keys and known hosts in $HOME\.ssh</li>
</ul>
<p>Obviously remotes that do not require authentication will work fine. e.g. public, read-only and local repositories.<br />
SSH is very easy to set up:</p>
<ol>
<li><a target="_blank" rel="nofollow" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Download puttygen</a> (Intel x86). Disregard the &#8220;Intel x86&#8221; business, it doesn&#8217;t matter what processor you have or whether your os is 64-bit or 32-bit. Puttygen is a very mature well establish application that is used by many other applications, for example all of the TortoiseXXX scm clients use Putty, Plink and Pageant. Here is the actual download here (click to download then click to install): <a target="_blank" rel="nofollow" href="http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe">http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe</a></li>
<li>Create a folder called <i>.ssh</i> in your %&#8211; USERPROFILE%. On Windows 7 this is <i>C:\Users\<your account name></your></i> and on XP it is <i>C:\Documents and Settings\<your account name></your></i>. You can do this in Matlab: <code>mkdir(fullfile(getenv('userprofile'), '.ssh'))</code>.</li>
<li>Create a key using puttygen, this is fairly self explanatory, and kind of fun, but do *not* set a pass-phrase; leave those fields blank! </li>
<li>Using puttygen, find the conversion menu tab and export the key in the openSSH format to the <i>.ssh</i> folder that you created earlier. </li>
<li>Now copy and paste your public key to your remote repositories (Github, Bitbucket, etc.) as needed. Jsch, which is the ssh client that JGit uses, should now work out of the box.</li>
</ol>
<p>Unfortunately using SSL (HTTPS) isn&#8217;t possible with <i><b>JGit4MATLAB</b></i>. Sorry. but hopefully you&#8217;ll love the excitement of using ssh key pairs!</p>
<h3 id="TODO">Further development</h3>
<p>Possible future work on the Matlab-JGit integration includes assigning standard <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/matlab/matlab_env/keyboard-shortcuts.html">keyboard-shortcuts</a> to common source-control tasks, integration as toolbar/toolstrip icons for easier access, and in the Matlab Editor in general. Only a few days ago, a reader on this blog has <a target="_blank" href="/articles/accessing-the-matlab-editor/#comment-222055">shown interest</a> in this.<br />
In the far future, integration with <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/matlab/source-control.html">Matlab&#8217;s existing source-control system</a>. Anyone wish to pick up the glove?<br />
JGit is covered by the <a target="_blank" rel="nofollow" href="https://github.com/eclipse/jgit/blob/master/LICENSE">BSD 3-clause license</a> which is very permissive, and should allow MathWorks or anyone for that matter to develop an integrated JGit application for Matlab. There are more packages in JGit than just the porcelain API, including Swing utilities and other utilities that can be used to create rich user interfaces and experiences, but the development would have to be in Java. Developers should look at the developer&#8217;s section of the JGit website and use either the Maven or Github repository to set up their forks.</p>
<h3 id="Conclusion">Conclusion</h3>
<p>JGit and Matlab are a natural combination. JGit is a mature and thorough open-source project. Most porcelain commands are available without any additional work. There are some arcanae, but the API documentation is sufficient to figure out most things using short high-level code. If you find yourself diving too deep, then scan the docs some more, and you will probably find a shortcut.</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/jgit-matlab-integration">JGit-Matlab integration</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/json-matlab-integration" rel="bookmark" title="JSON-Matlab integration">JSON-Matlab integration </a> <small>JSON can easily be integrated in Matlab to achieve cross-platform standard API. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-java-interface-using-static-control" rel="bookmark" title="Matlab-Java interface using a static control">Matlab-Java interface using a static control </a> <small>The switchyard function design pattern can be very useful when setting Matlab callbacks to Java GUI controls. This article explains why and how....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/spicing-up-the-matlab-editor" rel="bookmark" title="Spicing up the Matlab Editor">Spicing up the Matlab Editor </a> <small>Matlab's Editor and Workspace can be enhanced quite significantly using an open-source utility. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab" rel="bookmark" title="Using Groovy in Matlab">Using Groovy in Matlab </a> <small>Groovy code can seamlessly be run from within Matlab. ...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/jgit-matlab-integration/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
