Error in linear regression

조회 수: 1 (최근 30일)
Keegan Carvalho
Keegan Carvalho 2018년 7월 10일
편집: Matt J 2018년 7월 10일
I tried creating a regression model for the csv file (attached). The formula I wanted to create was sl~sst +at.
I loaded the table using "readtable" and then input the code to load the data in a table:
tbl = table(sl,sst,at,'VariableNames',{'Sea level','SST','AirT'})
I get the following error:
Error using feval
Not enough input arguments.
Error in sl (line 15)
[varargout{1:nargout}]=feval(varargin{:});
I would appreciate some help in this matter.

채택된 답변

Matt J
Matt J 2018년 7월 10일
편집: Matt J 2018년 7월 10일
You have a function named sl() somewhere in your path, one that requires input arguments. Matlab is interpreting your use of sl in
tbl = table(sl,sst,at,'VariableNames',{'Sea level','SST','AirT'})
as a call to that function with no input arguments.
  댓글 수: 4
Keegan Carvalho
Keegan Carvalho 2018년 7월 10일
It worked! Thanks @Matt J
Matt J
Matt J 2018년 7월 10일
편집: Matt J 2018년 7월 10일
You're welcome, but please Accept-click the answer to certify the question as resolved.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by