Please tell me what corrections can I make when encountering the following error?
4 次查看(过去 30 天)
显示 更早的评论
[X, Y, T] = ndgrid(xspan, yspan, tspan0);
R_pre = interpn(X, Y, T, u_history, x, y, tref, 'linear');
Incorrect use of griddedInterpolant.
GridVectors must define grids whose size is compatible with the Values array.
0 个评论
回答(1 个)
Torsten
2024-6-18
移动:Torsten
2024-6-18
We don't know the contents and sizes of the arrays you use. So we are unable to help.
This would work e.g. :
xspan = linspace(0,1,5);
yspan = linspace(3,5,10);
tspan0 = linspace(0,1,22);
u_history = rand(5,10,22);
R_pre = interpn(xspan,yspan,tspan0,u_history,0.2,4,0.25,'linear')
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!