I have 3 sets of data containing 10 numbers each. example >> x=[-77.0675, -75.3709, -73.4958, -70.8106, -68.0568, -65.7213, -63.6809, -61.8022, -60.7548, -59.0176]; >> y=[-174.3252, -176.0859, -178.0156, -180.2053, -182.2752, -184.0714, -186.6690, -189.5100, -191.8722, -194.4930]; >> z=[738.9531, 736.8734, 735.4359, 735.1597, 735.2994, 735.8879, 736.5197, 737.7522, 738.6343, 739.2247]; I can 3d plot this data with the plot3 command, but am unable to create a linear line of best fit for the 3 data sets. Does anybody know how to do this?
MATLAB: How to create a linear line of best fit for a set of 3-dimensional coordinates
line of best fitlinear regressionMATLAB
Related Question
- I have a matrix with two columns. I want to create a new one that only contains the rows without a 0 in the second column.
- How to count specific numbers in a matrix
- Derivative of a function
- InterX issues. Showing intersection when there is none.
- I am using a simple code to calculate solution of three nonlinear equations using fsolve. But i get the error saying “Error using vertcat Dimensions of matrices being concatenated are not consistent.” I checked the dimensions they are equal. Help!
Best Answer