Page 1 of 1

Calling study.visualize in matlab will cause matlab to crash

Posted: Thu Jun 01, 2023 6:48 am
by luckyme
Dear Moco development team and Moco users,

Thank you all for your contributions to the biomechanics community!

I have some issues, when I call study.visualize() in my own code which including my own model and mocostudy, matlab will crash.If I delete the command study.visualize(),matlab will not crash.

In addition,I tried the exampleSquatToStand.m which including study.visualize().This example will not crash matlab.

The system is Windows10 and the version of Matlab is 2021a and 2023a.This issue occurs in both versions of matlab.

I am confused about this phenomenon and I have no idea about how to resolve this problem,could anyone give me some advice? Thank you very much!

Best Wishes,
Matthew

Re: Calling study.visualize in matlab will cause matlab to crash

Posted: Mon Jun 05, 2023 3:07 pm
by nbianco
Hi Matthew,

You need to pass your solution to the visualize method for it to work properly:

Code: Select all

study = MocoStudy();
% your MocoStudy configuration
solution = study.solve();
study.visualize(solution);
Best,
Nick