<p>Hello.</p>
<p>plot(x(1:64),y(1:64),varargin(:))</p>
<p>should work.</p>
<p>Éric</p>
<div class="gmail_quote">Le 12 sept. 2013 00:20, "matt bruensteiner" <<a href="mailto:matt_bruensteiner@yahoo.com">matt_bruensteiner@yahoo.com</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:tahoma,new york,times,serif"><div style="font-family:tahoma,'new york',times,serif;font-size:12pt">Hi,</div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">I'm sure this has been asked before, but I'm finding it very difficult to search out the answer.</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">
I created a function:</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif"><br></div><div style="background-color:transparent"><font face="tahoma, new york, times, serif">function plotfirst64(x, y, varargin)</font></div>
<div style="background-color:transparent"><span style="font-family:tahoma,'new york',times,serif;background-color:transparent">    plot(x(1:64), y(1:64), varargin );</span><br></div><div style="background-color:transparent">
<span style="font-family:tahoma,'new york',times,serif;background-color:transparent">endfunction</span><br></div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt"><br></div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt">
My intention is that the varargin arguments to my function should become arguments to plot, allowing me to control the plot appearance when calling my function. Obviously, SciLab doesn't work that way and if I try to use the
 varargin, those arguments are ignored.</div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt"><br></div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt">For example, I do `ploteye(x, y, "thickness", 2)` or `ploteye(x, y, "r-")` and the plot still comes out with the default line style.</div>
<div style="font-family:tahoma,'new york',times,serif;font-size:12pt"><br></div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt">Searching online I found that Matlab has a syntax that should do what I want like this:</div>
<div style="font-family:tahoma,'new york',times,serif;font-size:12pt"><br></div><div style="font-family:tahoma,'new york',times,serif;font-size:12pt"><div style="font-family:'Times New Roman';font-size:16px;background-color:transparent">
<font face="tahoma, new york, times, serif">function plotfirst64(x, y, varargin)</font></div><div style="font-family:'Times New Roman';font-size:16px;background-color:transparent"><span style="font-family:tahoma,'new york',times,serif;background-color:transparent">    plot(x(1:64), y(1:64), varargin{:} );</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif"><span style="font-family:tahoma,'new york',times,serif;background-color:transparent"><br>
</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">But that doesn't seem to work in SciLab either.</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">How can I pass varargin arguments through to a function called inside my function?</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">
Thanks,</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:tahoma,'new york',times,serif">
Matt</div></div></div></div><br>_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
<br></blockquote></div>