Message Boards Message Boards

0
|
1625 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to fix Part::partw error

Posted 1 year ago

How to correct the code which produces

Part::partw Part::partd errors Part::partw: Part 2 of Y[tau] does not exist.

Part::partd: Part specification {Y->InterpolatingFunction[{{-2.11454,0.}},{5,3,1,{437},{4},0,0,0,0,Automatic,{},{},False},{{-2.11454,<<49>>,<<387>>}},{{{-34.6432,8.237},{3.35084*10^11,-6.32877*10^10}},<<49>>,<<387>>},{Automatic}]}[[1,All,1,2]] is longer than depth of object.

POSTED BY: John Wick
Posted 1 year ago

I'm not seeing that Y or tau are defined anywhere. So, when you call ft, the first argument is Y[tau] literally. Y[[1]] resolves to tau, but there is no second element, so Y[[2]] generates the message.

The rest of the messages might just be a consequence of that first problem, but I didn't try to debug the entire thing. Fix the first problem and see where that gets you.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract