WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
6106 Views
|
2 Replies
|
2 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Integral from a numerical list
Mohammad Zaman
Mohammad Zaman
Posted
12 years ago
Hello.
I have a list like Acc={0,1,2,2,3,3,4,5,...}; I want to integral fom Acc. with unit step. (Like Trapzoidal Method with (b-a)=1; as same as Cumtrapz Command in MATLAB . How can I do it.
Could you please help me?
POSTED BY:
Mohammad Zaman
Reply
|
Flag
2 Replies
Sort By:
Replies
Likes
Recent
1
Simon Schmidt
Simon Schmidt
Posted
12 years ago
Accumulate[Most@Acc + Rest@Acc]/2
POSTED BY:
Simon Schmidt
Reply
|
Flag
1
Bill Simpson
Bill Simpson
Posted
12 years ago
Acc = {0, 1, 2, 2, 3, 3, 4, 5};
Rest[FoldList[Plus, 0, Map[Total[#]/2 &, Partition[Acc, 2, 1]]]]
POSTED BY:
Bill Simpson
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback