Path: news.mathworks.com!not-for-mail
From: "Ketan " <useless.id@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Error using mnrfit
Date: Tue, 24 Jun 2008 04:36:02 +0000 (UTC)
Organization: ABB Corporate Research Ltd
Lines: 57
Message-ID: <g3ptji$4fh$1@fred.mathworks.com>
References: <g3h71p$615$1@fred.mathworks.com> <g3n25n$qlf$1@fred.mathworks.com>
Reply-To: "Ketan " <useless.id@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1214282162 4593 172.30.248.37 (24 Jun 2008 04:36:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 24 Jun 2008 04:36:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 926436
Xref: news.mathworks.com comp.soft-sys.matlab:475558



"Steven Lord" <slord@mathworks.com> wrote in message 
<g3n25n$qlf$1@fred.mathworks.com>...
> 
> "Ketan " <useless.id@gmail.com> wrote in message 
> news:g3h71p$615$1@fred.mathworks.com...
> > Hello,
> >
> > I am getting the following error while using mnrfit.
> >
> > ====ERROR====
> > ??? Error using ===> mnrfit
> > Inputs to mnrfit must be floats, namely single or 
double.
> >
> > Error in ==> mnrfit at 125
> > dataClass = superiorfloat(x,y);
> > ====ERROR====
> >
> > The variable x is double. I tried type casting it by
> > x=single(x); but the error persists.
> 
> Hint from the error message:
> 
> Input***_s_*** to mnrfit must be floats, namely single or 
double.
> 
> [Emphasis mine.]
> 
> Both the X and Y inputs to MNRFIT must be floats (i.e. 
single or double). 
> You've eliminated X as the cause of the problem, which 
means ...
> 
> -- 
> Steve Lord
> slord@mathworks.com 
> 
> 

Steve,

Thanks for your reply.

I tried that. 

Actually at first, I was getting the following error:

??? Error using ==> mnrfit at 164
If Y is a column vector, it must contain positive integer 
category numbers.

So, I type casted Y as integer. Then I get the error that I 
mentioned in my earlier message, asking me to convert Y 
into float. I do not understand why is this happening?

--
Ketan