[英]Interpolating data fails: grid vectors do not define a grid of points that match the given values
[英]The grid vectors do not define a grid of points that match the given values
我在Matlab中插值有問題。 我有一個矩陣,名為CPDLiverVol1(7570x3 double)。 我需要對這個矩陣進行插值,所以我使用了interp1
inp = interp1((1:116),permute(double(CPDLiverVol1),[2 1 3]),(1:166),'linear',0);
但是我得到這個錯誤:
網格矢量未定義與給定值匹配的點的網格。
interp1中的錯誤(第188行)F = griddedInterpolant(Xext,V,method);
誰能幫我什么是錯的?
也許這就是您想要的,
inp = interp1(1:3,CPDLiverVol1.',linspace(1,3,166),'linear',0);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.