Dynamic lookup with variable length vectors

I have been using the attached function successfully in real time models. As attached it runs nicely with a fixed time step integrator. Now have a need for the same functionality in a variable time step model. Is it possible at all?

1 件のコメント

Andy
Andy 2020 年 5 月 22 日
To me this is still an open issue, but for my immediate need I have a pretty robust alternative. Instead of using variable array height, I can stretch or shrink all arrays to a common height with code such as:
newXvec = linspace(inputBlock(1,1), inputBlock(end,1), inputLengthSpec)';
tempArg1 = interp1(inputBlock(:,1), inputBlock(:,2:end), newXvec, 'makima');
outputArg1 = [newXvec tempArg1];
Combined with pre- and post- processing to force monotinicity, it is works nicely with variable time step solvers.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeModeling についてさらに検索

質問済み:

2020 年 5 月 7 日

コメント済み:

2020 年 5 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by