can anyone help me in this simpson's 3/8 rule code, ?

shm_yli

New Member
Joined
May 21, 2021
Messages
15
Office Version
  1. 2016
Platform
  1. Windows
Sub simp38()
a = 0
b = 120
n = 3
h = (b - a) / n
I = h * (f(a) + f(b)) / 2
For m = 2 To n
I = I + f(a + h * (m - 1)) * h
Next
Range("b3").Value = I

End Sub


my given
x | 0 | 20| 40 |60 |80 |100 |120|
y| 0 |7.4 |11.8 |15.2 |15| 9.2 |0.2|
h= 20 n= 6 segments

im really a new in this and dont have any background in this type of program, i hope you can help me
 
i only find simpson 1/3 rule in the youtube and just wanna ask if that can also be use as a reference in making the code for this ??

If the assignment requires that you to use (one of) Simpson's 3/8 rule, how can you consider Simpson's 1/3 rule now?

I will not be able to help you further.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
If the assignment requires that you to use (one of) Simpson's 3/8 rule, how can you consider Simpson's 1/3 rule now?

I will not be able to help you further.
i'm just asking if i can use it, because that's the only simpson's that I can find in the internet with code

but thanks for the time you spend in answering my question, thank you
 
Upvote 0

Forum statistics

Threads
1,215,233
Messages
6,123,771
Members
449,122
Latest member
sampak88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top