| | |
question---->matlab code
Please support our Legacy and Other Languages advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2007
Posts: 9
Reputation:
Solved Threads: 0
hello 
i'm trying to creat a code to evalute this equation as a function of u
eq=(u)(u+1)(u+2).........(u+s-1) ,where s is a given value
an after so calculates the integral of this function from 0 to 1
this is the code i wrote but i got an error
and this is the error i got
although when i tried to call the prod2 function in the command window it worked 
so please help me

i'm trying to creat a code to evalute this equation as a function of u
eq=(u)(u+1)(u+2).........(u+s-1) ,where s is a given value
an after so calculates the integral of this function from 0 to 1
this is the code i wrote but i got an error
%in prod2.m file function m=prod2(u) s=5; m=prod(u:u+s-1);
%in test.m file Q=quad(@prod2,0,1)
and this is the error i got
•
•
•
•
??? Index exceeds matrix dimensions.
Error in ==> C:\MATLAB6p5\toolbox\matlab\funfun\quad.m
On line 68 ==> if ~isfinite(y(7))
Error in ==> C:\MATLAB6p5\work\test.m
On line 2 ==> Q=quad(@prod2,0,1)

so please help me
![]() |
Similar Threads
- Urgent : Question on editing a python program .... (Python)
- Reading a giant data file (C++)
- Function & writing to file problem (Python)
- question in matlab (Legacy and Other Languages)
- MATLAB code help please.... (Legacy and Other Languages)
- MATLAB Help (Legacy and Other Languages)
- matlab help : function, global, and ode45 (Legacy and Other Languages)
Other Threads in the Legacy and Other Languages Forum
- Previous Thread: Opening Multple Browsers from a Batch file
- Next Thread: can someone help meeeee about scheme language
Views: 735 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Legacy and Other Languages





