<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: FIG files format	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/fig-files-format/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/fig-files-format?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fig-files-format</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Mon, 05 Jun 2017 16:08:13 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-408014</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Mon, 05 Jun 2017 16:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-408014</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/fig-files-format#comment-408013&quot;&gt;E. LeFort&lt;/a&gt;.

There are probably multiple children, so accessing &lt;code&gt;children.children&lt;/code&gt; and/or &lt;code&gt;children.properties&lt;/code&gt; results in an understandable error. You can try to access individual children using indexing, for example: &lt;code&gt;fig.hgS_070000.children(1).children(1).properties&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/fig-files-format#comment-408013">E. LeFort</a>.</p>
<p>There are probably multiple children, so accessing <code>children.children</code> and/or <code>children.properties</code> results in an understandable error. You can try to access individual children using indexing, for example: <code>fig.hgS_070000.children(1).children(1).properties</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: E. LeFort		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-408013</link>

		<dc:creator><![CDATA[E. LeFort]]></dc:creator>
		<pubDate>Mon, 05 Jun 2017 16:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-408013</guid>

					<description><![CDATA[Hello, great post. I want to share an issue and hopefully receive some help in defining the solution. Fist I derived a plot using the risetime function in matlab. This plot contains all types of information I would like to extract. Specifically the upper cross time which is marked with a red &quot;x&quot; by default.

I performed the following code:

&lt;pre lang=&quot;matlab&quot;&gt;
fig.hgS_070000.children.children.properties
&lt;/pre&gt;

However, when ran I received the following error:

&lt;pre lang=&quot;matlab&quot;&gt;
&quot;Expected one output from a curly brace or dot indexing expression, but there were 2 results.&quot;
&lt;/pre&gt;

Is there a way to access this curly brace Information? I suspect this is an indexing issue however I have no idea how to access it. 

Any help is greatly appreciated.]]></description>
			<content:encoded><![CDATA[<p>Hello, great post. I want to share an issue and hopefully receive some help in defining the solution. Fist I derived a plot using the risetime function in matlab. This plot contains all types of information I would like to extract. Specifically the upper cross time which is marked with a red &#8220;x&#8221; by default.</p>
<p>I performed the following code:</p>
<pre lang="matlab">
fig.hgS_070000.children.children.properties
</pre>
<p>However, when ran I received the following error:</p>
<pre lang="matlab">
"Expected one output from a curly brace or dot indexing expression, but there were 2 results."
</pre>
<p>Is there a way to access this curly brace Information? I suspect this is an indexing issue however I have no idea how to access it. </p>
<p>Any help is greatly appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-383973</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Sat, 23 Jul 2016 21:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-383973</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/fig-files-format#comment-383740&quot;&gt;ElGalloGringo&lt;/a&gt;.

Not sure why you think it should not. Any MATLAB OOP class can define custom saveobj and loadobj methods to deal with the serialisation/deserialization process.  

Not your question but maybe relevant to what you are doing: an undocumented (I think) feature of MATLAB is that constructors will accept a structure on input. So
&lt;pre lang=&quot;matlab&quot;&gt;
s.Name=&#039;This is my figure&#039;;
h=figure(s);
&lt;/pre&gt;
will give you a figure with the specified Name and other properties set to their default values. All HG objects seem to comply with this. Add properties as required to s.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/fig-files-format#comment-383740">ElGalloGringo</a>.</p>
<p>Not sure why you think it should not. Any MATLAB OOP class can define custom saveobj and loadobj methods to deal with the serialisation/deserialization process.  </p>
<p>Not your question but maybe relevant to what you are doing: an undocumented (I think) feature of MATLAB is that constructors will accept a structure on input. So</p>
<pre lang="matlab">
s.Name='This is my figure';
h=figure(s);
</pre>
<p>will give you a figure with the specified Name and other properties set to their default values. All HG objects seem to comply with this. Add properties as required to s.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ElGalloGringo		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-383740</link>

		<dc:creator><![CDATA[ElGalloGringo]]></dc:creator>
		<pubDate>Thu, 21 Jul 2016 17:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-383740</guid>

					<description><![CDATA[I am trying to write my own script to parse this struct data and generate a figure from a subset of the children handles. One weird thing I am running into is that even though in the struct from the FIG file the title, xlabel, and ylabel show up as children of the axes, when the FIG file is loaded with openfig, those children handles get assigned to the &#039;title&#039;, &#039;xlabel&#039;, and &#039;ylabel&#039; properties of the axes. I can&#039;t figure out how Matlab is determining that these children handles are special and shouldn&#039;t just be added as children. 

Any thoughts?]]></description>
			<content:encoded><![CDATA[<p>I am trying to write my own script to parse this struct data and generate a figure from a subset of the children handles. One weird thing I am running into is that even though in the struct from the FIG file the title, xlabel, and ylabel show up as children of the axes, when the FIG file is loaded with openfig, those children handles get assigned to the &#8216;title&#8217;, &#8216;xlabel&#8217;, and &#8216;ylabel&#8217; properties of the axes. I can&#8217;t figure out how Matlab is determining that these children handles are special and shouldn&#8217;t just be added as children. </p>
<p>Any thoughts?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-380539</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 16 Jun 2016 06:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-380539</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/fig-files-format#comment-380513&quot;&gt;Varshini Guddanti&lt;/a&gt;.

@Varshini - load() simply returns a Matlab struct. You can then process and convert this struct in your Matlab code in whichever way that you wish.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/fig-files-format#comment-380513">Varshini Guddanti</a>.</p>
<p>@Varshini &#8211; load() simply returns a Matlab struct. You can then process and convert this struct in your Matlab code in whichever way that you wish.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Varshini Guddanti		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-380513</link>

		<dc:creator><![CDATA[Varshini Guddanti]]></dc:creator>
		<pubDate>Thu, 16 Jun 2016 01:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-380513</guid>

					<description><![CDATA[Can the &#039;load&#039; method convert the figure into a matrix to do some operations later?]]></description>
			<content:encoded><![CDATA[<p>Can the &#8216;load&#8217; method convert the figure into a matrix to do some operations later?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lo que he aprendido: exportar todas las imágenes fig de una carpeta a pdf con Matlab &#124; Onda Hostil		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-374365</link>

		<dc:creator><![CDATA[Lo que he aprendido: exportar todas las imágenes fig de una carpeta a pdf con Matlab &#124; Onda Hostil]]></dc:creator>
		<pubDate>Thu, 14 Apr 2016 13:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-374365</guid>

					<description><![CDATA[[&#8230;] Relación entre figuras y archivos mat [&#8230;]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] Relación entre figuras y archivos mat [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Martin		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-354009</link>

		<dc:creator><![CDATA[Martin]]></dc:creator>
		<pubDate>Wed, 29 Jul 2015 10:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-354009</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/fig-files-format#comment-353931&quot;&gt;Mariam&lt;/a&gt;.

@Mariam – you can also use the &lt;em&gt;&lt;strong&gt;-struct&lt;/strong&gt;&lt;/em&gt; flag of the &lt;em&gt;&lt;strong&gt;save&lt;/strong&gt;&lt;/em&gt; function, if you want to modify the struct &lt;em&gt;s&lt;/em&gt; directly without going through another temporary variable:
&lt;pre lang=&quot;matlab&quot;&gt;
save(&#039;testFig.fig&#039;, &#039;-struct&#039;, &#039;s&#039;, &#039;-mat&#039;);
&lt;/pre&gt;
That way the field names of the struct &lt;em&gt;s&lt;/em&gt; are treated as the variable names to be saved to the file.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/fig-files-format#comment-353931">Mariam</a>.</p>
<p>@Mariam – you can also use the <em><strong>-struct</strong></em> flag of the <em><strong>save</strong></em> function, if you want to modify the struct <em>s</em> directly without going through another temporary variable:</p>
<pre lang="matlab">
save('testFig.fig', '-struct', 's', '-mat');
</pre>
<p>That way the field names of the struct <em>s</em> are treated as the variable names to be saved to the file.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-353996</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 29 Jul 2015 08:12:09 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-353996</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/fig-files-format#comment-353988&quot;&gt;Mariam&lt;/a&gt;.

@Mariam - the &lt;i&gt;&lt;b&gt;save&lt;/b&gt;&lt;/i&gt; command save the data including the variable name as top-level struct field. You should keep the same top-level field-name as used by the FIG format (hgS_070000 or hgM_070000):

&lt;pre lang=&#039;matlab&#039;&gt;
s = load(&#039;IPS.fig&#039;,&#039;-mat&#039;);
hgS_070000 = s.hgS_070000;

% modify hgS_070000

save(&#039;IPS.fig&#039;,&#039;hgS_070000&#039;,&#039;-mat&#039;);
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/fig-files-format#comment-353988">Mariam</a>.</p>
<p>@Mariam &#8211; the <i><b>save</b></i> command save the data including the variable name as top-level struct field. You should keep the same top-level field-name as used by the FIG format (hgS_070000 or hgM_070000):</p>
<pre lang='matlab'>
s = load('IPS.fig','-mat');
hgS_070000 = s.hgS_070000;

% modify hgS_070000

save('IPS.fig','hgS_070000','-mat');
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mariam		</title>
		<link>https://undocumentedmatlab.com/articles/fig-files-format#comment-353988</link>

		<dc:creator><![CDATA[Mariam]]></dc:creator>
		<pubDate>Wed, 29 Jul 2015 03:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2013#comment-353988</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/fig-files-format#comment-353951&quot;&gt;Yair Altman&lt;/a&gt;.

I tried it without making any changes to &#039;s&#039;. Just loading it 

&lt;pre lang=&#039;matlab&#039;&gt;s = load(&#039;C:\Users\Mariam\Desktop\fitted response\atlas masks\IPS.fig&#039;,&#039;-mat&#039;);&lt;/pre&gt;
 and re-saving it

&lt;pre lang=&#039;matlab&#039;&gt;save(&#039;testFig.fig&#039;,&#039;s&#039;,&#039;-mat&#039;); % save modified d struct&lt;/pre&gt;
However the effect remains it 

&lt;pre lang=&#039;matlab&#039;&gt;
open(&#039;testFig.fig&#039;)
??? Error using ==&gt; open at 163
Invalid Figure file format.
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/fig-files-format#comment-353951">Yair Altman</a>.</p>
<p>I tried it without making any changes to &#8216;s&#8217;. Just loading it </p>
<pre lang='matlab'>s = load('C:\Users\Mariam\Desktop\fitted response\atlas masks\IPS.fig','-mat');</pre>
<p> and re-saving it</p>
<pre lang='matlab'>save('testFig.fig','s','-mat'); % save modified d struct</pre>
<p>However the effect remains it </p>
<pre lang='matlab'>
open('testFig.fig')
??? Error using ==> open at 163
Invalid Figure file format.
</pre>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
