same models in MATLAB and Simulink but different results! what would you do in this case?

3 visualizzazioni (ultimi 30 giorni)
Hi everyone,
I am building a model in simulink which I have done it in MATLAB before. In one specific part of the model a PDE must be solved using iterative loop for two variables (pressure and air thickness in Reynold's equation)for 51*51 points in matrix-form. This proccess is done by using 2 while loops in MATLAB-code and different blocks including MATLAB-fcn block in simulink. As you may see in two attached pictures there are instability in both models from MATLAB-code and Simulink for one those two variables (at the right side of pictures) but in simulink (right) it's deffinitively much more greater (and also negative values) than by result form MATLAB-code (left) and exactly because of that I recieve a whole different result for the second variable with exact the same constrains. What would you change or test in Simulink in order to obtain the exact result as in MATLAB-code?

Risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by