Form File error: time values must be monotonically non-decreasing

I'm trying to load a matrix(146*2) from mat file in a simulink model. The first column is the time value, which is non-decreasing. The second column is the current value at that time. But everytime I compile the simulink model, the error message is like time vaules in file 'Current.mat' must be monotonically non-decreasing. Even if I change the time values to 1:146, I still get the same error message. Anyone have an idea of what is the problem?

 采纳的回答

Your matrix should be 2x146
The first row is time and the second is your signal

2 个评论

Thanks very much for your help. It seems this error is solved. But now it pop out another error says that algebraic loops are not supported in generated code. Use the ashow commmand in the simulink debugger to see the algebraic loops. Do you know how to deal with this?

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by