Divided difference in Newton's form error
조회 수: 10 (최근 30일)
이전 댓글 표시
Above in my function and below is my code to call function in Matlab Grader. The problem I have is that it is telling me the variable a must be a size of [1 6]. It is currently of size [1 5]. Check where the variable is assigned a value. Can anyone tell me how to adjust my a values which is also my coefficients in order to get the size [1 6]?
function a=dd(x,f)
n = 4;
a = [-5, 2, -4, 8, 3];
end
a=dd([0, 1, -1, 2, -2], [-5, -3, -15, 39, -9]);
댓글 수: 0
답변 (1개)
Torsten
2022년 11월 5일
Whatever your code is supposed to do, add a sixth element to the vector "a" in function "dd":
a = [-5, 2, -4, 8, 3, 6];
instead of
a = [-5, 2, -4, 8, 3];
참고 항목
카테고리
Help Center 및 File Exchange에서 Polynomials에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!