Hi everyone,
I was trying to implement the new location of a ligament to its origin or insertion point based on a "for" loop. My script was like below:
new_musAttachLocCoords_v3 = Vec3(new_musAttachLocCoords(1), new_musAttachLocCoords(2), new_musAttachLocCoords(3));
currentPathPoint = PathPoint.safeDownCast(currentPathPointSet.get(n_p));
currentPathPoint.set_location(new_musAttachLocCoords_v3);
(Where "n_p" is the counter of "for loop")
But I ended up getting the following error which seems a Matlab error, not APIs:
Struct contents reference from a non-struct array object.
Error in SCRIPT (line 202)
currentPathPoint.set_location(new_musAttachLocCoords_v3);
I'll be extremely thankful if someone tells me how to fix it.
Bests,
Sina
Error in setting new location of Ligament in Matlab
- Sina Tabeiy
- Posts: 8
- Joined: Thu Sep 05, 2019 4:15 am
- Sina Tabeiy
- Posts: 8
- Joined: Thu Sep 05, 2019 4:15 am
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Error in setting new location of Ligament in Matlab
Posting a minimal working example (https://en.wikipedia.org/wiki/Minimal_working_example) might make it easier for someone to help. Based on the code you have provided, it isn't clear what "new_musAttachLocCoords(1)" is, so perhaps the constructor for "new_musAttachLocCoords_v3" isn't working? You might try simplifying your code (e.g., removing the loop) to help isolate the issue.Any advice?