<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi:<br>I've noticed that if i make a function with for example 3 inputs arguments, and in the call i forget to give one input argument, the function uses (if it exist) a variable from the console with the same name of the missing argument. For example... i have this function:<br><br>function y=circconv(x,h,N)<br> x=x(:)';h=h(:)';<br> hzp=zeros(1,N);xzp=zeros(1,N)<br> if length(x)<N then<br> xzp=[x zeros(1,N-length(x))]<br> else<br> xzp=x(1:N);<br> end<br> if length(h)<N then<br> hzp=[h zeros(1,N-length(h))]<br> else<br> hzp=h(1:N);<br> end<br> y=ifft(fft(xzp).*fft(hzp))<br>endfunction<br><br>If i call the function without giving the argument N, but there is a variable called N in the workspace, it uses that N...<br>Is this intentional? So, if i want the user to give exactly the 3 arguments... the only solution would be using argn?<br><br>because this was causing me some bugs<br> </div></body>
</html>