Too many arguments with lsline even using Matlab example
2 vues (au cours des 30 derniers jours)
Strangely, using the code given by Matlab for lsline, I get the too many arguments error. Any ideas? Probably one of those simple code issues that just take forever to figure out!! (for me at least)
rng default % For reproducibility
x = 1:10;
y1 = x + randn(1,10);
y2 = 2*x + randn(1,10);
ax1 = subplot(2,1,1);
ax2 = subplot(2,1,2);
Jorik le 20 Jan 2015
Are you using R2014b? In R2014a and older, lsline did not accept an input argument. The error message then makes sense. Maybe you used the online (R2014b) documentation, but you are using a different MATLAB release?
The R2014a documentation is also available, but it does not include an equivalent example: http://www.mathworks.com/help/releases/R2014a/stats/lsline.html
Plus de réponses (1)
Andreas Goser le 20 Jan 2015
Modifié(e) : Andreas Goser le 20 Jan 2015
This code example runs in my R2104b, Win64 installation.
The question is in which line you get the error?
Take the function(s) from that line and try the
which functionname -all
command on them. Maybe the effect is caused by you having another function or variable shadowing.