Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: error with mpower
Date: Wed, 28 Oct 2009 13:03:37 -0400
Organization: The MathWorks, Inc.
Lines: 25
Message-ID: <hc9tfo$hpm$1@fred.mathworks.com>
References: <148229629.126692.1256747632594.JavaMail.root@gallium.mathforum.org>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1256749368 18230 172.31.44.65 (28 Oct 2009 17:02:48 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 28 Oct 2009 17:02:48 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:580684



"Jumi" <plopony@hotmail.com> wrote in message 
news:148229629.126692.1256747632594.JavaMail.root@gallium.mathforum.org...
>I don't understand why I am getting an error when I run this. It says that 
>there is an error with mpower... that the matrix must be a square. but 
>here... I am just trying to raise a scalar to a scalar power...
>
> note... both Pa and Pe are scalars
>
> Pa = absorbed/ntrials;
> Pe = emitted/ntrials;
>
> Teff = input('enter effective temperature in K');

What do you/the user enter here?  Is Teff a scalar or a nonscalar?  My guess 
is that it's nonscalar.  To check this, put a breakpoint on this line in 
your code and step through the rest of the execution, making sure on each 
line that the variables with which you're working have the sizes you expect.

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ