<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843</link>
    <title>MATLAB Central Newsreader - How to do this in the vector form?</title>
    <description>Feed for thread: How to do this in the vector form?</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>Wed, 21 Jan 2009 16:23:02 -0500</pubDate>
      <title>How to do this in the vector form?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843#622998</link>
      <author>Mohammad Monfared</author>
      <description>Hi everybody!&lt;br&gt;
&lt;br&gt;
I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for non-zero elements. I know some ways to to this job but not the vector form solution. Is there any vector-form answer? &lt;br&gt;
&lt;br&gt;
thanks,&lt;br&gt;
Reza.</description>
    </item>
    <item>
      <pubDate>Wed, 21 Jan 2009 16:37:02 -0500</pubDate>
      <title>Re: How to do this in the vector form?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843#623004</link>
      <author>Matt </author>
      <description>&quot;Mohammad Monfared&quot; &amp;lt;gohardoust@gmail.com&amp;gt; wrote in message &amp;lt;gl7i56$pei$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi everybody!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for non-zero elements. I know some ways to to this job but not the vector form solution. Is there any vector-form answer? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks,&lt;br&gt;
&amp;gt; Reza.&lt;br&gt;
&lt;br&gt;
sum(A,2)./sum(A~=0,2)</description>
    </item>
    <item>
      <pubDate>Wed, 21 Jan 2009 17:04:01 -0500</pubDate>
      <title>Re: How to do this in the vector form?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843#623017</link>
      <author>Mohammad Monfared</author>
      <description>&quot;Matt &quot; &amp;lt;mjacobson.removethis@xorantech.com&amp;gt; wrote in message &amp;lt;gl7ive$nrj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Mohammad Monfared&quot; &amp;lt;gohardoust@gmail.com&amp;gt; wrote in message &amp;lt;gl7i56$pei$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi everybody!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for non-zero elements. I know some ways to to this job but not the vector form solution. Is there any vector-form answer? &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; thanks,&lt;br&gt;
&amp;gt; &amp;gt; Reza.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; sum(A,2)./sum(A~=0,2)&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
oh! Great and simple. so thanks!&lt;br&gt;
Is it possible to use the 'trimmean' function in vector form or the 'sort' should be employed?&lt;br&gt;
&lt;br&gt;
Reza.</description>
    </item>
    <item>
      <pubDate>Wed, 21 Jan 2009 17:13:02 -0500</pubDate>
      <title>Re: How to do this in the vector form?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843#623022</link>
      <author>Matt </author>
      <description>&quot;Mohammad Monfared&quot; &amp;lt;gohardoust@gmail.com&amp;gt; wrote in message &amp;lt;gl7ki1$fhs$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Matt &quot; &amp;lt;mjacobson.removethis@xorantech.com&amp;gt; wrote in message &amp;lt;gl7ive$nrj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Mohammad Monfared&quot; &amp;lt;gohardoust@gmail.com&amp;gt; wrote in message &amp;lt;gl7i56$pei$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Hi everybody!&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for non-zero elements. I know some ways to to this job but not the vector form solution. Is there any vector-form answer? &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; thanks,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Reza.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; sum(A,2)./sum(A~=0,2)&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; oh! Great and simple. so thanks!&lt;br&gt;
&amp;gt; Is it possible to use the 'trimmean' function in vector form or the 'sort' should be employed?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Reza.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I'm not familiar with 'trimmean' nor with its relation to 'sort'.</description>
    </item>
    <item>
      <pubDate>Wed, 21 Jan 2009 18:40:23 -0500</pubDate>
      <title>Re: How to do this in the vector form?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843#623041</link>
      <author>Walter Roberson</author>
      <description>Matt wrote:&lt;br&gt;
&amp;gt; &quot;Mohammad Monfared&quot; &amp;lt;gohardoust@gmail.com&amp;gt; wrote in message &amp;lt;gl7i56$pei$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for&lt;br&gt;
&amp;gt;&amp;gt; non-zero elements.&lt;br&gt;
&lt;br&gt;
&amp;gt; sum(A,2)./sum(A~=0,2)&lt;br&gt;
&lt;br&gt;
That solution leads to unexpected results if an entire row is all-zero. On the other&lt;br&gt;
hand, the original poster didn't say what should be done in that case...&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
.signature note: I am now avoiding replying to unclear or ambiguous postings.&lt;br&gt;
Please review questions before posting them. Be specific. Use examples of what you mean,&lt;br&gt;
of what you don't mean. Specify boundary conditions, and data classes and value&lt;br&gt;
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?</description>
    </item>
    <item>
      <pubDate>Wed, 21 Jan 2009 19:41:02 -0500</pubDate>
      <title>Re: How to do this in the vector form?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242843#623058</link>
      <author>Mohammad Monfared</author>
      <description>Walter Roberson &amp;lt;roberson@hushmail.com&amp;gt; wrote in message &amp;lt;a_Jdl.18329$Ew6.17698@newsfe22.iad&amp;gt;...&lt;br&gt;
&amp;gt; Matt wrote:&lt;br&gt;
&amp;gt; &amp;gt; &quot;Mohammad Monfared&quot; &amp;lt;gohardoust@gmail.com&amp;gt; wrote in message &amp;lt;gl7i56$pei$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; non-zero elements.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; sum(A,2)./sum(A~=0,2)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; That solution leads to unexpected results if an entire row is all-zero. On the other&lt;br&gt;
&amp;gt; hand, the original poster didn't say what should be done in that case...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; .signature note: I am now avoiding replying to unclear or ambiguous postings.&lt;br&gt;
&amp;gt; Please review questions before posting them. Be specific. Use examples of what you mean,&lt;br&gt;
&amp;gt; of what you don't mean. Specify boundary conditions, and data classes and value&lt;br&gt;
&amp;gt; relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?&lt;br&gt;
&lt;br&gt;
Yes you are right!&lt;br&gt;
I was thinking a way using 'trimmean' function in a vector form. It seems I should write a function and check for occasions. </description>
    </item>
  </channel>
</rss>

