An object starts with an initial velocity of 3 m/s at t = 0 and it accelerates with an acceleration of a(t) = 7t m/s2 . Find the total distance traveled in 4 s using two polyint(), and print your answer with units to the command window.
1 次查看(过去 30 天)
显示 更早的评论
I'm not sure if it is necessary to look up physics formulas for this or what? I have no experience with polyint, I just know that it integrates polynomials, but I don't think that is where my problems with this lie. I'm also pretty sure all we need to use are the 2 polyint functions to get the answer.
2 个评论
Stephen23
2017-9-21
@Snooping Poppet: it is not appreciated when you edit away the text of your question. Imagine if everyone did that, then this entire forum would be useless for anyone else as it would only consist of thousands of threads all reading "This post was taken down". Would you find that useful?
By deleting your question you unilaterally decided that James Tursa's volunteered time helping you shall not be useful to anyone else. Does James Tursa get a say in this decision? Do you think this is why we volunteers come here and write our advice and comments?
If you want a consulting service then you will find plenty of them on them internet. This is a community forum with answers provided by volunteers.
回答(1 个)
James Tursa
2016-11-15
编辑:James Tursa
2016-11-15
Start with:
doc polyint
doc polyval
Then use the following:
acceleration = a polynomial in t (per your question)
velocity = initial velocity + integral of acceleration
position = initial position + integral of velocity
For the integrals, use polyint as directed (look at the examples in the doc to see how to make a vector of coefficients to represent your polynomials). To get the numeric answer at t = 4 you can use the polyval function.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!