Hi !! I want to find area under a sine curve , from interval 0.1 to 0.3.

2 views (last 30 days)
I used the following command to find area under a sine curve , from interval 0.1 to 0.3.
Q=quad(@sin(x), 0.1, 0.3);
But it is not working.
Can somebody please help

Accepted Answer

Nick Sharma
Nick Sharma on 20 Aug 2018
Thanks Dimitirs ...it resolved my problem..:)

More Answers (2)

Walter Roberson
Walter Roberson on 20 Aug 2018
Q = quad(@sin, 0.1, 0.3);

Dimitris Kalogiros
Dimitris Kalogiros on 20 Aug 2018
You have a syntax error on your command. You must omit parenthesis from sin function. I am giving it to you at the proper format:
Q=quad(@sin, 0.1, 0.3)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!