Now i understand what you were saying. I was a bit confused, but now it s clear. Thank you!

**Info**

This question is closed. Reopen it to edit or answer.

# linear equation without coefficients

1 view (last 30 days)

Show older comments

##### 1 Comment

### Answers (1)

William Alberg
on 17 May 2020

I think the polyfit command is what you are looking for. It should work like this

k = polyfit(x,y,1)

a = k(1)

b = k(2)

##### 5 Comments

William Alberg
on 18 May 2020

I have not tried that before. But it appears that the following code works.

F = @(x,xdata) x(1)*sqrt(xdata);

c = lsqcurvefit(F,0,x,z)

It can end up in a local minimum point, so you should be aware of that

### See Also

### Community Treasure Hunt

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

Start Hunting!