Fit a regression line by using `MATLAB` I have the following data 
  Individual     Heart rate     Weight    Hours of exercise per week
       1           72            134             3.2
       2           81            201             3.5
       3           60            156             7.1
       4           82            148             2.4
       5           75            170             1.2

Now i have to fit a regression line by using MATLAB.
But which one is independent variable ? Hours of exercise per week? And is that  Heart rate & Weight response variables ?
Then how can i fit one regression line ? If i have two response or two independent variables, won't i get two  regression line ?
 A: It sounds like you're mixed up on a few different things.
First, independent variables are the inputs, causes, or explanatory variables, or predictors to your model, while the dependent variables are the outputs from the model, since they "depend" on the values of the independent variables (hopefully!).
You can definitely have a single regression line with multiple independent variables. For example, you might model something like
$$ \textrm{Heart Rate} = \beta_0 + \beta_1 \textrm{Weight} + \beta_2\textrm{Exercise}$$
People sometimes make a distinction between multiple linear regression, where the model has two or more explanatory variables, from simple linear regression, which has only one. Neither of these should be confused with multivariate regression, where one predicts multiple variables at once, as in
$$<\textrm{Heart Rate}, \textrm{Weight}> = \beta_0 + \beta_1 \textrm{Exercise} + \ldots$$
Since the independent and dependent variables depend on your hypothesis, only you can decide which are which. For example, you might suspect that resting heart rate is affected by one's weight and exercise habits. If so, you'd use weight and exercise as the independent variables, while heart rate is the dependent variable. This would give you the first model, show above. On the other hand, you might want to predict weight from someone's resting heart rate and exercise. In this case, your model would look something like:
$$ \textrm{Weight} = \beta_0 + \beta_1 \textrm{Heart Rate} + \beta_2\textrm{Exercise}$$
There are several ways to do a regression in matlab. The regress function (documentation here) might be a reasonable place to start. You'll need to make an $n \times 1$ vector of responses (call it $y$; it is the dependent variable) and an $n \times p$ vector of predictors (the matching values of the dependent variable(s); call this $x$). Then, you run something like b = regress(y,x); to get the associated coefficients (e.g., b(1) is the coefficient for the values in x(:,1)). Note that if you want a constant term in your model, you need to add a column of all ones to your predictor matrix!
There are several other methods in matlab for fitting linear regression models. The statistics toolbox has a Linear Model class. The curve fitting app cftool can interactively fit linear (and other models); the toolbox also includes a programmatic fit function. Due to how the math works out, you can also just use matrix division b = X\y. Take a look and see which of these fits your workflow the best. Beware that some of the methods insert a constant/intercept term into your model but others do not. Make sure you try at least a few out and get what you want. 
