How to find the equation of a line for a 3d line plot

6 vues (au cours des 30 derniers jours)
Alex Doyle
Alex Doyle le 26 Fév 2018
Hello Matlab community!
I have three variables plotted on a 3-d graph (two position variables and one time variable). In order to calculate the instantaneous velocity--ie the derivative of the line at each point--I need to define the equation of this line.
Does anyone have an idea of how to go about doing this? Google forums haven't helped yet!

Réponses (1)

Prajit T R
Prajit T R le 1 Mar 2018
It is possible to get the equation of the line using the fit function. Assuming that the two position variables are x and y, and the time variable being t, x=f(t) and y=g(t). You can use the fit function to get the equations for x in terms of t and y in terms of t. The instantaneous velocity can be obtained by using the derivatives of these equations. The Curve Fitting toolbox is well-equipped to help you in your quest. To access the curve fitting tool, type 'cftool' in the command line.
Cheers

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by