Results 1 to 3 of 3

Math Help - Help with calculating integral in MATLAB

  1. #1
    Newbie
    Joined
    Nov 2009
    Posts
    1

    Help with calculating integral in MATLAB

    Hey there people! This will probably be easy for you.. But not for me! I am new to the program MATLAB (reading a course where I have to use it). Ive been googling some and tried other ways to get help, but without results.

    I want to make an M-file that calculates the definite integral of ∫x3 dx in the interval 3 1.

    All help is appriciated!

    Regards, Chazed.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Mar 2007
    Posts
    206
    Awards
    1
    Do u want to calculate it using your own numerical methods or buy using matlabs symbolic tool kit. Matlabs has it's own numerical implementation of simpsons rule to I think. Sorry I don't have matlabs with me right now so can't post an example.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Chazed View Post
    Hey there people! This will probably be easy for you.. But not for me! I am new to the program MATLAB (reading a course where I have to use it). Ive been googling some and tried other ways to get help, but without results.

    I want to make an M-file that calculates the definite integral of ∫x3 dx in the interval 3 – 1.

    All help is appriciated!

    Regards, Chazed.
    Midpoint rule:

    Code:
    dx=0.001;
    x=1+dx/2:dx:3
    ii=x.^3;
    II=sum(ii)*dx;
    and if you really mean to do the integral from 3 to 1 the answer is minus the above.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Calculating integral
    Posted in the Calculus Forum
    Replies: 2
    Last Post: July 21st 2011, 06:59 AM
  2. Calculating integral
    Posted in the Differential Geometry Forum
    Replies: 6
    Last Post: July 3rd 2011, 09:10 AM
  3. need help calculating this integral
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 11th 2008, 10:59 PM
  4. need some help calculating this integral
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 7th 2008, 01:54 AM
  5. calculating a integral -need help
    Posted in the Calculus Forum
    Replies: 7
    Last Post: July 31st 2007, 10:49 PM

Search Tags


/mathhelpforum @mathhelpforum