Why is the output from Signal Editor not as expected?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 26 Juil 2024
Modifié(e) : MathWorks Support Team
le 26 Juil 2024
The signal output from Signal Editor does not match the expected signal created in the scenario. Why is this happening?
Réponse acceptée
MathWorks Support Team
le 26 Juil 2024
The time data imported from external experimental data or created as T2 = [0:0.02:10]' can cause discrepancies (diff) between the time steps used by Simulink, which may lead to unexpected simulation results.
In this case, replacing the time data with the Simulink time step as shown below can avoid the mismatch issue.
timeVector = timeStep * [startTime:numSteps-1]'
This is explained in the "Specifying Time Data" section of the following documentation page.
Load Data to Root-Level Input Ports:
https://www.mathworks.com/help/releases/R2021a/simulink/ug/load-data-to-root-level-input-ports-1.html
Additionally, the "Note" explains that time data obtained incrementally, such as [0:0.2:10], may not match Simulink's time steps, so please check that.
For more details, please refer to the following blog post.
https://blogs.mathworks.com/simulink/2012/02/09/using-discrete-data-as-an-input-to-your-simulink-model/?from=jp
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!