Campbell-Muscle-Lab / MATMyoSim

MyoSim model written in MATLAB
https://campbell-muscle-lab.github.io/MATMyoSim
1 stars 6 forks source link

Issues in simulation_driver on mac computer #6

Closed akschroer closed 4 years ago

akschroer commented 4 years ago

The code was working well for me, but I shared it with an undergraduate student who is working with me over the summer using a mac computer, and she first had an issue with the path to the simulation driver and then the following error:

Error using optimoptions (line 124) Empty keys are not allowed in this container.

Error in muscle/impose_force_balance (line 32) opt = optimoptions('fsolve','Display','none');

Error in muscle (line 65) impose_force_balance(obj,-2);

Error in simulation (line 44) obj.m = muscle(obj.myosim_model);

Error in simulation_driver (line 14) myosim_simulation = simulation( ...

Error in demo_twitch_2 (line 15) sim_output = simulation_driver( ...

Is there a difference in path definition between PCs and macs that you know of that might have led to this issue? Thanks!

kenatcampbellmusclelab commented 4 years ago

@akschroer - the paths might be tricky as the conventions are different on Unix. I'll try to be better at writing in system-neutral syntax going forward.

There's probably another issue though. Does the undergrad have the optimization tookboxes installed? @dcolli23 is going to write up some stuff on the installation requirements.

akschroer commented 4 years ago

I will check what toolboxes she has installed. Thanks!

dcolli23 commented 4 years ago

@akschroer I can confirm that error is due to the lack of the Global Optimization Toolbox (of which the Optimization Toolbox is a dependency) as I encountered it quite recently! Installation of those two packages should clear this specific error up.

I hope to enumerate the installation requirements in a more formal manner shortly.

I can also speak on the difference in path definition. For manipulation of the path on Windows, the backslash, \ is used, where on Unix-based machines like Mac, the forward slash is used, /. Any time you use the addpath function in MATLAB on a Mac, it should be using the forward slash. Hopefully this clarifies things a bit!

kenatcampbellmusclelab commented 4 years ago

I changed the demos to use / as directory separators. It looks as if it works on Windows and will hopefully work on Mac too. I'm closing this for now.