<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171307</link>
    <title>MATLAB Central Newsreader - Error using mnrfit</title>
    <description>Feed for thread: Error using mnrfit</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>Fri, 20 Jun 2008 21:22:01 -0400</pubDate>
      <title>Error using mnrfit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171307#438727</link>
      <author>Ketan </author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I am getting the following error while using mnrfit. &lt;br&gt;
&lt;br&gt;
====ERROR====&lt;br&gt;
??? Error using ===&amp;gt; mnrfit&lt;br&gt;
Inputs to mnrfit must be floats, namely single or double.&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; mnrfit at 125&lt;br&gt;
dataClass = superiorfloat(x,y);&lt;br&gt;
====ERROR====&lt;br&gt;
&lt;br&gt;
The variable x is double. I tried type casting it by &lt;br&gt;
x=single(x); but the error persists. &lt;br&gt;
&lt;br&gt;
Any help will be much appreciated.&lt;br&gt;
&lt;br&gt;
Regards,</description>
    </item>
    <item>
      <pubDate>Mon, 23 Jun 2008 02:35:35 -0400</pubDate>
      <title>Re: Error using mnrfit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171307#438963</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Ketan &quot; &amp;lt;useless.id@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:g3h71p$615$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am getting the following error while using mnrfit.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; ====ERROR====&lt;br&gt;
&amp;gt; ??? Error using ===&amp;gt; mnrfit&lt;br&gt;
&amp;gt; Inputs to mnrfit must be floats, namely single or double.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Error in ==&amp;gt; mnrfit at 125&lt;br&gt;
&amp;gt; dataClass = superiorfloat(x,y);&lt;br&gt;
&amp;gt; ====ERROR====&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The variable x is double. I tried type casting it by&lt;br&gt;
&amp;gt; x=single(x); but the error persists.&lt;br&gt;
&lt;br&gt;
Hint from the error message:&lt;br&gt;
&lt;br&gt;
Input***_s_*** to mnrfit must be floats, namely single or double.&lt;br&gt;
&lt;br&gt;
[Emphasis mine.]&lt;br&gt;
&lt;br&gt;
Both the X and Y inputs to MNRFIT must be floats (i.e. single or double). &lt;br&gt;
You've eliminated X as the cause of the problem, which means ...&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Tue, 24 Jun 2008 04:36:02 -0400</pubDate>
      <title>Re: Error using mnrfit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171307#439204</link>
      <author>Ketan </author>
      <description>&quot;Steven Lord&quot; &amp;lt;slord@mathworks.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g3n25n$qlf$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Ketan &quot; &amp;lt;useless.id@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:g3h71p$615$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I am getting the following error while using mnrfit.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; ====ERROR====&lt;br&gt;
&amp;gt; &amp;gt; ??? Error using ===&amp;gt; mnrfit&lt;br&gt;
&amp;gt; &amp;gt; Inputs to mnrfit must be floats, namely single or &lt;br&gt;
double.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Error in ==&amp;gt; mnrfit at 125&lt;br&gt;
&amp;gt; &amp;gt; dataClass = superiorfloat(x,y);&lt;br&gt;
&amp;gt; &amp;gt; ====ERROR====&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; The variable x is double. I tried type casting it by&lt;br&gt;
&amp;gt; &amp;gt; x=single(x); but the error persists.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hint from the error message:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Input***_s_*** to mnrfit must be floats, namely single or &lt;br&gt;
double.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; [Emphasis mine.]&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Both the X and Y inputs to MNRFIT must be floats (i.e. &lt;br&gt;
single or double). &lt;br&gt;
&amp;gt; You've eliminated X as the cause of the problem, which &lt;br&gt;
means ...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Steve,&lt;br&gt;
&lt;br&gt;
Thanks for your reply.&lt;br&gt;
&lt;br&gt;
I tried that. &lt;br&gt;
&lt;br&gt;
Actually at first, I was getting the following error:&lt;br&gt;
&lt;br&gt;
??? Error using ==&amp;gt; mnrfit at 164&lt;br&gt;
If Y is a column vector, it must contain positive integer &lt;br&gt;
category numbers.&lt;br&gt;
&lt;br&gt;
So, I type casted Y as integer. Then I get the error that I &lt;br&gt;
mentioned in my earlier message, asking me to convert Y &lt;br&gt;
into float. I do not understand why is this happening?&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
Ketan</description>
    </item>
    <item>
      <pubDate>Tue, 24 Jun 2008 12:36:41 -0400</pubDate>
      <title>Re: Error using mnrfit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171307#439265</link>
      <author>Peter Perkins</author>
      <description>Ketan wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; Actually at first, I was getting the following error:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ??? Error using ==&amp;gt; mnrfit at 164&lt;br&gt;
&amp;gt; If Y is a column vector, it must contain positive integer &lt;br&gt;
&amp;gt; category numbers.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So, I type casted Y as integer. Then I get the error that I &lt;br&gt;
&amp;gt; mentioned in my earlier message, asking me to convert Y &lt;br&gt;
&amp;gt; into float. I do not understand why is this happening?&lt;br&gt;
&lt;br&gt;
&amp;nbsp;From the help:&lt;br&gt;
&lt;br&gt;
&quot;Y is an N-by-K matrix, where Y(I,J) is the number of outcomes of the &lt;br&gt;
multinomial category J for the predictor combinations given by X(I,:).  The &lt;br&gt;
sample sizes for each observation (rows of X and Y) are given by the row sums &lt;br&gt;
SUM(Y,2). Alternatively, Y can be an N element column vector of scalar integers &lt;br&gt;
from 1 to K indicating the value of the response for each observation, and all &lt;br&gt;
sample sizes are taken to be 1.&quot;&lt;br&gt;
&lt;br&gt;
I don't know what you had in Y originally, but since you got the message, &quot;If Y &lt;br&gt;
is a column vector, it must contain positive integer category numbers&quot;, &lt;br&gt;
presumably you had a column vector containing something other than integer &lt;br&gt;
values.  The message was telling you to supply integer _values_, not an integer &lt;br&gt;
array.&lt;br&gt;
&lt;br&gt;
Hope this helps.</description>
    </item>
  </channel>
</rss>

