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!