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

5 次查看(过去 30 天)
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!

回答(1 个)

Prajit T R
Prajit T R 2018-3-1
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

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by