while using interp1 for matrix type data the following error found
이전 댓글 표시
Error using griddedInterpolant The grid vectors must contain unique points.
Error in interp1 (line 161) F = griddedInterpolant(X,V,method);
Error in sample1 (line 40) thr_new(j,:) = interp1(trq(j,:),thr,trq_new,'linear','extrap')
채택된 답변
추가 답변 (3개)
KSSV
2018년 4월 3일
Let x, y be your x and y data.
[xx,ia,ic] = unique(x,'legacy')
yy = y(ia) ;
Now use interp1 on xx and yy
Lohith k j
2018년 4월 3일
편집: KSSV
2018년 4월 3일
Image Analyst
2018년 4월 3일
0 개 추천
interp1() is meant for vectors, not matrices.
Why are you trying to use a matrix?
Use interp2() or scatteredInterpolant() or griddedInterpolant() instead.
댓글 수: 1
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!