Sample Time and simOut Interaction
Show older comments
Hey Guys
so i have a Simulink-Simscape model that runs for 5 sec. During the time i have a Transform sensor measuring the distance between 2 points. This x,y,z-coordinates are saved in my workspace with simout (To Workspace). The problem is that this matrix varies between the size 900x3 and 1300x3, depending on the parameters of my Block. I think the matix size changes because the automatic generated sample time is changing because of parameter changes. I want the matrix to always be 1000x3, no matter how my model changes. So i got to Model Settings and changed the Solvertype from "Variable-step" to "Fixed-step" and changed the the "Fixed-step size" to 5/1000 (or 0.005), to have 1000 steps over 5 sec. But when i run the model now, the model is not simulating and i dont know why the simout doesnt work with fixed-step. if i set the Fixed step size to "auto", the model is simulating but only with an output of 1x3
The other thing i tried is to leave it on Fixed-step size and just change Max, Min and Initial step size from "auto" to "0.005", but then its also not simulating
I hope my Problem is understandable
Accepted Answer
More Answers (1)
Keep the orginal solver settings you had (assuming they gave you an acceptable solution). Set the Sample Time parameter in the To Workspace block to 0.005.
Categories
Find more on Configure Simulation Conditions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!