![]() | ||
Step 1: |
Start matlab by double clicking on the matlab icon on the desktop.
![]() | |
Step 2: |
Enter the x and y values as vectors.
>>
x=[1 2 3 4 5 6];
| |
Step 3: |
Type "polyfit(x,y,1)".
![]() | |
Step 4: |
The result is the slope and y-intercept:
ans =
|