<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172893</link>
    <title>MATLAB Central Newsreader - apply non-integer power on column vector</title>
    <description>Feed for thread: apply non-integer power on column vector</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, 19 Jul 2008 19:54:02 -0400</pubDate>
      <title>apply non-integer power on column vector</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172893#444122</link>
      <author>Alfred Chua</author>
      <description>Hi,&lt;br&gt;
I am having a problem on how to solve the equation out.&lt;br&gt;
Suppose i am having a column vector:-&lt;br&gt;
s=[3;-5] &lt;br&gt;
when i attempt to apply non-integer power of 3/5 on the&lt;br&gt;
column vector, it is not able to obtain my desired result.&lt;br&gt;
the desired answer suppose to be s=[1.933 ; -2.627] however&lt;br&gt;
when i apply the following command s.^(3/5), it yields&lt;br&gt;
s=[1.9332 ;-0.8116 + 2.4980i]. May i know what is the exact&lt;br&gt;
command to be used to solve the problem.</description>
    </item>
    <item>
      <pubDate>Sat, 19 Jul 2008 21:55:05 -0400</pubDate>
      <title>Re: apply non-integer power on column vector</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172893#444133</link>
      <author>Arthur G</author>
      <description>On Jul 19, 3:54=A0pm, &quot;Alfred Chua&quot; &amp;lt;alfred...@lycos.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; I am having a problem on how to solve the equation out.&lt;br&gt;
&amp;gt; Suppose i am having a column vector:-&lt;br&gt;
&amp;gt; s=3D[3;-5]&lt;br&gt;
&amp;gt; when i attempt to apply non-integer power of 3/5 on the&lt;br&gt;
&amp;gt; column vector, it is not able to obtain my desired result.&lt;br&gt;
&amp;gt; the desired answer suppose to be s=3D[1.933 ; -2.627] however&lt;br&gt;
&amp;gt; when i apply the following command s.^(3/5), it yields&lt;br&gt;
&amp;gt; s=3D[1.9332 ;-0.8116 + 2.4980i]. May i know what is the exact&lt;br&gt;
&amp;gt; command to be used to solve the problem.&lt;br&gt;
&lt;br&gt;
=46rom the documentation for power:&lt;br&gt;
&quot;Note that for a negative value X and a non-integer value Y, if the&lt;br&gt;
abs(Y) is less than one, the power function returns the complex roots.&lt;br&gt;
To obtain the remaining real roots, use the nthroot function.&quot;&lt;br&gt;
&lt;br&gt;
To obtain your desired result, combine &quot;power&quot; and &quot;nthroot&quot; as&lt;br&gt;
follows:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; nthroot([3;-5], 5).^3&lt;br&gt;
&lt;br&gt;
ans =3D&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1.9332&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-2.6265&lt;br&gt;
&lt;br&gt;
-Arthur</description>
    </item>
  </channel>
</rss>

