MATLAB Coderのinterp1の外挿動作について
15 次查看(过去 30 天)
显示 更早的评论
yq=interp1(x, y, xq, 'linear', 'extrap') を Coder でビルドしようとすると'extrap' のある影響でエラーになります。 MATLAB 本体ではcharでもdoubleでも受け付ける項目のためかと存じます。 Coder に対しどのように設定すれば動作しますでしょうか。 現状 char 1 x :inf で設定してます。 また、上記エラーが出ると MATLAB 全体がフリーズして PC をシャットダウンするかかなり長時間待ってからMATLABを強制終了しないと復帰しません。
3 个评论
Walter Roberson
2017-6-5
In R2017a, on OS-X, I had no problems with extrap with code generation:
function yq = testinterp
x = 1:20;
y = sin(x*pi/7);
xq = linspace(0,30,20);
yq = interp1(x, y, xq, 'linear', 'extrap');
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 インストールとライセンスの紹介 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!