help with linear regression function
Show older comments
bear with me this is goign to be a long description: Im trying to follow the interpret linear regression example from mathworks but I'm getting errors:
I have 3 sets of data: the order is age, weight, BP 52 173 132 59 184 143 67 194 153 73 211 162 64 196 154 74 220 168 54 188 137 61 188 149 65 207 159 46 167 128 72 217 166
I'm trying to set BP as the dependet(predictor) and age and weidgt as the independent columns. this is my code
if true
% code
age=[ 52 59 67 73 64 74 54 61 65 46 72]'
BP=[132 143 153 162 154 168 137 149 159 128 166]'
weight =[173 184 194 211 196 220 188 188 207 167 217]'
x1= age;
x2=weight;
BP=y;
X=[x1,x2,y]
lm= fitlm(X,y,'linear')% when I enter this I get this error
??? Undefined function or method 'fitlm' for
input arguments of type 'double'.
end
can somebody help me? please I need help
Accepted Answer
More Answers (0)
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!