<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244</link>
    <title>MATLAB Central Newsreader - String Operations</title>
    <description>Feed for thread: String Operations</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 07 Nov 2009 16:11:01 -0500</pubDate>
      <title>String Operations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244#692900</link>
      <author>Chris Wright</author>
      <description>I was wondering if someone could give me some advice on some string manipulations (as i am newish to Matlab).&lt;br&gt;
&lt;br&gt;
I have lots of strings in the form of (that are being extracted from an xml file):&lt;br&gt;
&lt;br&gt;
-94%22%-4%92%-9%16%18%21%-31%-1%7%-20%9%14%19%22%-7%-1%3%13%-10%-1%0%11%-2%2%2%0%-3%5%1%-4%-3%-3%-3%-1%0%-3%-6%-15%-15%-6%-6%2%1%2%1%-9%1%0%2%2%2%3%3%0%0%0%0%-2%1%0%-3%-3%&lt;br&gt;
&lt;br&gt;
with varying amount of numbers and numbers of upto 150 (for anyone who is interested these are the MPEG-7 image descriptors for SCD)..&lt;br&gt;
&lt;br&gt;
What i want to do is extract the numbers (and signs) and put each one into a different cell in an array... so the % divides the numbers&lt;br&gt;
&lt;br&gt;
any ideas for the best way ??</description>
    </item>
    <item>
      <pubDate>Sat, 07 Nov 2009 16:34:01 -0500</pubDate>
      <title>Re: String Operations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244#692901</link>
      <author>dpb</author>
      <description>Chris Wright wrote:&lt;br&gt;
...&lt;br&gt;
&amp;gt; I have lots of strings in the form of (that are being extracted from&lt;br&gt;
&amp;gt; an xml file):&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -94%22%-4%92%-9%...&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt; any ideas for the best way ??&lt;br&gt;
&lt;br&gt;
strread(s,'%d','delimiter','%')&lt;br&gt;
&lt;br&gt;
would at least be one way (no claim for &quot;best&quot; :) )...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 07 Nov 2009 16:45:04 -0500</pubDate>
      <title>Re: String Operations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244#692903</link>
      <author>Wrighty43 Wright</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;hd47i0$jbq$1@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt; Chris Wright wrote:&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; &amp;gt; I have lots of strings in the form of (that are being extracted from&lt;br&gt;
&amp;gt; &amp;gt; an xml file):&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; -94%22%-4%92%-9%...&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; any ideas for the best way ??&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; strread(s,'%d','delimiter','%')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; would at least be one way (no claim for &quot;best&quot; :) )...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
thanks that really helps, saves me messing around with sscanf</description>
    </item>
    <item>
      <pubDate>Sat, 07 Nov 2009 16:57:28 -0500</pubDate>
      <title>Re: String Operations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244#692905</link>
      <author>dpb</author>
      <description>Wrighty43 Wright wrote:&lt;br&gt;
&amp;gt; dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;hd47i0$jbq$1@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; Chris Wright wrote:&lt;br&gt;
&amp;gt;&amp;gt; ...&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; I have lots of strings in the form of (that are being extracted from&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; an xml file):&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; -94%22%-4%92%-9%...&lt;br&gt;
&amp;gt;&amp;gt; ...&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; any ideas for the best way ??&lt;br&gt;
&amp;gt;&amp;gt; strread(s,'%d','delimiter','%')&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; would at least be one way (no claim for &quot;best&quot; :) )...&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
...&lt;br&gt;
&amp;gt; thanks that really helps, saves me messing around with sscanf&lt;br&gt;
&lt;br&gt;
Yeah, it's handy for cases like this, for certain.&lt;br&gt;
&lt;br&gt;
There's bound to be a way to get the stupid C format string to allow you &lt;br&gt;
to enter a literal percent character as a character-matching character, &lt;br&gt;
but I don't know just how that would be and it ain't worth futzin' w/ &lt;br&gt;
trying to figure out how since do have strread()&lt;br&gt;
&lt;br&gt;
W/O strread(), I'd probably do a substitution of ' ' for '%' _then_ use &lt;br&gt;
sscanf() just for the record.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sun, 08 Nov 2009 23:36:19 -0500</pubDate>
      <title>Re: String Operations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244#693096</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;dpb&quot; &amp;lt;none@non.net&amp;gt; wrote in message &lt;br&gt;
news:hd48tv$v8q$1@news.eternal-september.org...&lt;br&gt;
&amp;gt; Wrighty43 Wright wrote:&lt;br&gt;
&lt;br&gt;
*snip*&lt;br&gt;
&lt;br&gt;
&amp;gt; There's bound to be a way to get the stupid C format string to allow you &lt;br&gt;
&amp;gt; to enter a literal percent character as a character-matching character, &lt;br&gt;
&amp;gt; but I don't know just how that would be and it ain't worth futzin' w/ &lt;br&gt;
&amp;gt; trying to figure out how since do have strread()&lt;br&gt;
&lt;br&gt;
I would try two percent characters.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; fprintf('%%\n')&lt;br&gt;
%&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Sun, 08 Nov 2009 23:52:31 -0500</pubDate>
      <title>Re: String Operations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/265244#693104</link>
      <author>dpb</author>
      <description>Steven Lord wrote:&lt;br&gt;
&amp;gt; &quot;dpb&quot; &amp;lt;none@non.net&amp;gt; wrote in message &lt;br&gt;
...&lt;br&gt;
&amp;gt;&amp;gt; There's bound to be a way to get the stupid C format string to allow you &lt;br&gt;
&amp;gt;&amp;gt; to enter a literal percent character as a character-matching character, &lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt; I would try two percent characters.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; fprintf('%%\n')&lt;br&gt;
&amp;gt; %&lt;br&gt;
&lt;br&gt;
This was for sscanf() input, not output, and I was pretty sure I had &lt;br&gt;
tried it but must've had a typo I didn't recognize as&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt; s='-94%22%'&lt;br&gt;
s =&lt;br&gt;
-94%22%&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt; sscanf(s,'%d%%')&lt;br&gt;
ans =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-94&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;22&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
does work (at least when one types it in correctly :) ).&lt;br&gt;
&lt;br&gt;
I'm not sure what I did wrong now; I thought initially that would/should &lt;br&gt;
work correctly, too, but as noted somehow I futzed it, apparently.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
  </channel>
</rss>

