From: jens on 21 Apr 2010 14:54 "Steven Lord" <slord(a)mathworks.com> wrote in message <hqkbm3$36u$1(a)fred.mathworks.com>... > > "jens " <storebonghoved(a)hotmail.com> wrote in message > news:hqjg4k$g10$1(a)fred.mathworks.com... > > "Steven Lord" <slord(a)mathworks.com> wrote in message > > <hqia52$jbd$1(a)fred.mathworks.com>... > > *snip* > > >> That's correct -- PLOTYY expects you to pass in a string or function > >> handle as the 5th (and 6th, if necessary) So try an anonymous function -- > >> @(x, y) input1(x, y, e1, e2) > > *snip* > > >> > > Thanks for your help Steve > > > > I tried to use anonymous functions: > > > > x=1:3 > > e1=[5 6 7] > > e2=[20 30 40] > > y=[10 200 ; 20 300; 30 300] > > [AX,H1,H2]=plotyy(x,y(:,1),x+length(x),y(:,2),@(x,y,e1,e2)input1(x,y,e1,e2)) > > No. Reread the example I gave and the section of HELP PLOTYY that discusses > the 5th input argument. How does PLOTYY call that function? In particular, > with how many input arguments does it call that function? > > You have two extra input arguments in your anonymous function that shouldn't > be there. > > *snip* > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > Thank you very much Steve I solved my problem!!!! It all works perfect:D Best Regards Jens
First
|
Prev
|
Pages: 1 2 3 Prev: Multiplication of multidimensional arrays and computation speed Next: Centre y to x==0 in plot |