<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161681</link>
    <title>MATLAB Central Newsreader - function</title>
    <description>Feed for thread: function</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The 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>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 08 Jan 2008 00:59:04 -0500</pubDate>
      <title>Re: function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161681#408433</link>
      <author>Roger Stafford</author>
      <description>"J V" &amp;lt;vlchsjstn@yahoo.com&amp;gt; wrote in message &amp;lt;flugn6$quj&lt;br&gt;
$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; function Is = h()&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;     g()&lt;br&gt;
&amp;gt;     Is = (Ae*q*Dn*(Ni^2))/(Na*W);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; return;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; function [Ae q Dn W Ni Na]=g()&lt;br&gt;
&amp;gt;     Ae = input('cross-sectional area of the base-emitter &lt;br&gt;
&amp;gt; junction(in the direction perpendicular to the page? (Ae &lt;br&gt;
&amp;gt; cm^2) ');&lt;br&gt;
&amp;gt;     q = input('magnitude of the electron charge? (q &lt;br&gt;
&amp;gt; Coulomb) ');&lt;br&gt;
&amp;gt;     Dn = input('electron diffusivity in the base? (Dn &lt;br&gt;
&amp;gt; cm^2/s) ');&lt;br&gt;
&amp;gt;     W = input('effective width of the base? (W cm) ');&lt;br&gt;
&amp;gt;     Ni = input('intrinsic carrier density? (ni 1/cm^3) ');&lt;br&gt;
&amp;gt;     Na = input('doping concentration in the base? (Na &lt;br&gt;
&amp;gt; 1/cm^3) ');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; return;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; why does this function giving me an error?&lt;br&gt;
-------&lt;br&gt;
You haven't brought in the six variables in your call to g().  It should be:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;[Ae, q, Dn, W, Ni, Na]=g();&lt;br&gt;
&lt;br&gt;
The function 'h' doesn't  know these variables' values unless you do.&lt;br&gt;
&lt;br&gt;
Roger Stafford&lt;br&gt;
&amp;nbsp;&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 08 Jan 2008 00:39:02 -0500</pubDate>
      <title>function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161681#408432</link>
      <author>J V</author>
      <description>function Is = h()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;g()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Is = (Ae*q*Dn*(Ni^2))/(Na*W);&lt;br&gt;
&lt;br&gt;
return;&lt;br&gt;
&lt;br&gt;
function [Ae q Dn W Ni Na]=g()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ae = input('cross-sectional area of the base-emitter &lt;br&gt;
junction(in the direction perpendicular to the page? (Ae &lt;br&gt;
cm^2) ');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q = input('magnitude of the electron charge? (q &lt;br&gt;
Coulomb) ');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dn = input('electron diffusivity in the base? (Dn &lt;br&gt;
cm^2/s) ');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;W = input('effective width of the base? (W cm) ');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ni = input('intrinsic carrier density? (ni 1/cm^3) ');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Na = input('doping concentration in the base? (Na &lt;br&gt;
1/cm^3) ');&lt;br&gt;
&lt;br&gt;
return;&lt;br&gt;
&lt;br&gt;
why does this function giving me an error?&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
