I have 3 variables speed, dp,eff and I used the following code to 3d scatter plot the data. The scatter plot is attached. My question is how to find the best fit line for the scatter data on scatter plot. I tried curve fitting tool box but not working great. Help me find out the solution. i.e to find out the best fit line( eqn) and draw that line of scatter plot.
Thank you
load TEAVG_0Dafterconversion.mat
scatter3(speed,dp,eff)![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/361756/image.png)
xlabel('Speed')
ylabel('Dp')
zlabel('Eff')