Hello.

plot(x(1:64),y(1:64),varargin(:))

should work.

Éric
Le 12 sept. 2013 00:20, "matt bruensteiner" <[email protected]> a
écrit :

> Hi,
>
> I'm sure this has been asked before, but I'm finding it very difficult to
> search out the answer.
>
> I created a function:
>
> function plotfirst64(x, y, varargin)
>     plot(x(1:64), y(1:64), varargin );
> endfunction
>
> 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.
>
> 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.
>
> Searching online I found that Matlab has a syntax that should do what I
> want like this:
>
> function plotfirst64(x, y, varargin)
>     plot(x(1:64), y(1:64), varargin{:} );
>
> But that doesn't seem to work in SciLab either.
>
> How can I pass varargin arguments through to a function called inside my
> function?
>
> Thanks,
>
> Matt
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.scilab.org/mailman/listinfo/users
>
>
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to