MATLAB Coderのinterp1の外挿動作について

yq=interp1(x, y, xq, 'linear', 'extrap') を Coder でビルドしようとすると'extrap' のある影響でエラーになります。 MATLAB 本体ではcharでもdoubleでも受け付ける項目のためかと存じます。 Coder に対しどのように設定すれば動作しますでしょうか。 現状 char 1 x :inf で設定してます。 また、上記エラーが出ると MATLAB 全体がフリーズして PC をシャットダウンするかかなり長時間待ってからMATLABを強制終了しないと復帰しません。

댓글 수: 3

KSSV
KSSV 2017년 6월 5일
Approximate translation:
Attempting to build yq = interp1 (x, y, xq, 'linear', 'extrap') with Coder causes an error due to some influence of 'extrap'. In MATLAB itself, it is probably due to an item accepted by either char or double. How do I configure Coder to operate? It is currently set with char 1 x: inf. Also, if the above error occurs, MATLAB entirely freezes to shut down the PC or wait for quite a long time before returning unless MATLAB is forcibly terminated.
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');
michio
michio 2017년 6월 5일
편집: michio 2017년 6월 5일
R2017aで何通りか試してみましたが特に問題なさそうです。 使用されているMATLABのバージョンはちなみにどれでしょうか。 もしエラーを再現させられるコードなど、もう少し詳細頂けると何かお手伝いできるかもしれません。

댓글을 달려면 로그인하십시오.

답변 (0개)

제품

질문:

2017년 6월 5일

편집:

2017년 6월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!