The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Integration with variable limits
Replies: 17   Last Post: Aug 20, 2013 10:20 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 171
Registered: 3/20/12
Re: Integration with variable limits
Posted: Jul 25, 2013 4:58 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Torsten" wrote in message <ksrcel$2k$>...
> "Sanaa" wrote in message <ksrbia$r0l$>...
> > Hi all,
> > How to integrate a function within a loop and the limits of integration are variables?
> > For instance, y(i)*(1-y(i)) is the function I wish to integrate from 0.25*i to t where
> > t \in (0.25*i, 0.25*(i+1)).
> > Any help is really appreciated.
> > Sanaa Moussa

> I think y(i)*(1-y(i)) is just a real number, not a function, isn't it ?
> Best wishes
> Torsten.

Thanks for replying. You are right, but I mean the function is y*(1-y) which I want to put it into a loop
My code is
itermax=300;min=itermax-9;% That is we plot from 291:300 i.e. 10 values of x only.
for rho=0:0.001:4
for i=1:itermax-1
x(i+1)=x(i)+ rho*int(y(i)*(1-y(i)),i*r,(i+1)*r);
hold on
%title('r=0.25, \alpha=1','FontSize',fsize)
hold off
% print(gcf, '-djpeg', '-zbuffer', 'bif.png');

I get the error
Function 'int' is not defined for values of class 'double'.
what does this mean and how to fix it please?
Many thanks in advance.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.