Is interpolation faster in Simulink or Matlab?
6 次查看(过去 30 天)
显示 更早的评论
I have a Simulink program that is compiled. The Simulink program contains a Matlab function where the physics are modelled. For each timestep an interpolation will take place, a length is interpolated to an angle. I have the opportunity to choose whether to implement the interpolation in Simulink or within the Matlab function. What is the best?
I know 'interp1' is slow and that there are faster functions like 'interp1q' or 'interp1qr' in Matlab but that have greater demands for the input.
5 个评论
Walter Roberson
2017-6-19
For equally spaced x, see https://www.mathworks.com/matlabcentral/fileexchange/10286-fast-interpolation
For non-equally spaced x, see https://www.mathworks.com/matlabcentral/fileexchange/8627-fast-linear-interpolation
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!