'Polyfit' doesn't work
조회 수: 9 (최근 30일)
이전 댓글 표시
I have a problem in working with the the function "polyfit".
This is my script:
x=[0 2.05 3.1 4.8 5.6 6.8];
y=[0 2.74 6.1 18.3 27.4 36.6];
p=polyfit(x,y,6)
This is the error messsage I get from Matlab:
Attempt to execute SCRIPT polyfit as a function: C:\Users\Dawid\Desktop\Nowy folder\polyfit.m
Error in ==> polyfit at 3 p=polyfit(x,y,6)
How I can solve this problem? Thanks You very much.
댓글 수: 1
Image Analyst
2014년 3월 25일
Original question in case he deletes it like he's done with others:
I have a problem in working with the the function "polyfit".
This is my script:
x=[0 2.05 3.1 4.8 5.6 6.8];
y=[0 2.74 6.1 18.3 27.4 36.6];
p=polyfit(x,y,6)
This is the error messsage I get from Matlab:
Attempt to execute SCRIPT polyfit as a function: C:\Users\Dawid\Desktop\Nowy folder\polyfit.m
Error in ==> polyfit at 3 p=polyfit(x,y,6)
How I can solve this problem? Thanks You very much.
답변 (1개)
Walter Roberson
2013년 12월 7일
You accidentally named your own file polyfit.m which is interfering with using MATLAB's polyfit.m . You need to rename or delete your C:\Users\Dawid\Desktop\Nowy folder\polyfit.m
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!