Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: One or more output arguments not assigned during call
Date: Thu, 22 Aug 2013 18:54:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 67
Message-ID: <kv5mod$h6$1@newscl01ah.mathworks.com>
References: <ku883j$n4p$1@newscl01ah.mathworks.com> <kudtbu$fr3$1@newscl01ah.mathworks.com> <kult37$epu$1@newscl01ah.mathworks.com> <kum5bk$l17$1@newscl01ah.mathworks.com> <kv54hf$l4i$1@newscl01ah.mathworks.com> <kv5kdv$gng$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: rubyext-06-ls.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1377197645 550 172.20.102.182 (22 Aug 2013 18:54:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 22 Aug 2013 18:54:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3391687
Xref: news.mathworks.com comp.soft-sys.matlab:801309

"someone" wrote in message <kv5kdv$gng$1@newscl01ah.mathworks.com>...
> "Sanaa" wrote in message <kv54hf$l4i$1@newscl01ah.mathworks.com>...
> > Thanks a lot for your kind reply. To make the code clear, I have corrected all my files
> > function [T, Y]=FODuffing(parameters, orders, TSim, Y0,mu)
> > h=0.01;
> > % number of calculated mesh points:
> > n=round(TSim/h);
> > %orders of derivatives, respectively:
> > q1=orders(1); q2=orders(2); q3=orders(3);
> > % constants of financial system:
> > mu=0.9; 
> > lambda=parameters(1); b=parameters(2); gama=parameters(3); omega=parameters(4);
> > % binomial coefficients calculation:
> > cp1=1; cp2=1; cp3=1;
> > for j=1:n
> > c1(j)=(1-(1+q1)/j)*cp1;
> > c2(j)=(1-(1+q2)/j)*cp2;
> > c3(j)=(1-(1+q3)/j)*cp3;
> > cp1=c1(j); cp2=c2(j); cp3=c3(j);
> > end
> > % initial conditions setting:
> > x(1)=Y0(1); y(1)=Y0(2); z(1)=Y0(3);
> > % calculation of phase portraits /numerical solution/:
> > for i=2:n
> > x(i)=y(i-1)*h^q1 - memo(x, c1, i);
> > y(i)=z(i-1)*h^q2 - memo(y, c2, i);
> > z(i)=(-mu*y(i-1)-lambda*x(i-1)-b*x(i-1)^3+gama*sin(omega))*h^q3 - memo(z, c3, i);
> > end
> > for j=1:n
> > Y(j,1)=x(j); Y(j,2)=y(j); Y(j,3)=z(j);
> > end
> > T=0:h:TSim;
> > %%%%%%%%%%%%%
> > function [yo] = memo(r, c, k)
> > %
> > temp = 0;
> > for j=1:k-1
> >    temp = temp + c(j)*r(k-j);
> > end
> > yo = temp;
> > %%%%%%%%
> > and I call them in:
> > for mu=0:0.01:6
> > [t, y]=FODuffing([-1 1 0.6 1],[0.85 0.15 1],50, [0 0 0],mu);
> > D=[];
> > for i=2:length(y(:,2))-1
> >         if((y(i,2)>y(i-1,2))&&(y(i,2)>y(i+1,2)))
> >             D=[D; mu y(i,2)];
> >         end
> > end
> > end
> > 
> > Now there is no error comes out, however, there is no plot appears at all!!!!
> > 
> > Could you please explain that to me?
> 
> Can you show me where your plot statement is?
> And what you are plotting.
> 
> > Thanks a lot in advance.

I am sorry for that
Directly after the last end
plot(D(:,1),D(:,2),'b.','MarkerSize',2.5)
I got a point in the middle of the window!
I have looped over mu, so why did I get only one point?
Thanks a lot for your kind help