Coming up with an equation in matlab
This topic contains 1 reply, has 1 voice, and was last updated by SapnaVishwas 2 years, 8 months ago.
You must be logged in to reply to this topic.
Code with C | Programming: Projects & Source Codes › Forums › MATLAB › Coming up with an equation in matlab
This topic contains 1 reply, has 1 voice, and was last updated by SapnaVishwas 2 years, 8 months ago.
I am having a difficulty in an assignment that I have in matlab. I am given 3 points of a rocket, and I am suppose to find where and when is it going to land. The three points are (2,18),(4,32),(6,42) and I am pretty sure its a parabola because it comes down and we are only given 3 points. what I did (by hand) is plug in the numbers into y=ax^2+bx+c and solve the system of equations that results. I got -.5 for a, 10 for b and 0 for c, and came up with the equation
y=-.5x^2+10x. From there I can easily solve the 2 questions, but I think they somehow expect me to do it all in matlab. How would I start doing that? Is there a function that figures the equation, or do I have to write it all by myself?
Id say you will have to make your own function using the equations and then plot it. You could write a function that solves it for any input or just the ones you were asked for in the assignment
You must be logged in to reply to this topic.