MatLab programming (C++, Arrays)

I’m given a set of data points, x and y, and asked to find a slope and an intercept. What must I command? Can I get the codes at least?

why are you marking it as community wiki? Better search these question on stackoverflow because codechef is meant for competitive coding, very few members mi8 respond to questions like these

Have you tried the Curve Fitting App (Curve Fitting Toolbox, req’d)? You can use ‘cftool’ (cftool opens Curve Fitting app or brings focus to the app if it is already open) for your data. The intercept is in between two values as can be seen here. If the problem persists, you can get matlab assignment help about the commands or use this tool.

I’m confused. So you’re a spammer… but you also want to help people?