MATLAB throwing index out of bound error when attempting to save a MATLAB structure.
I'm attempting to save a MATLAB structure to a .MAT file.  The structure is composed of the following properties:

<pre>
trajectory =
        time: [2500x1 double]
    position: [2500x3 double]
</pre>

I have the following line of code:

<code>save(trajectoryNewFile, 'trajectory');</code>

Where <code>trajectoryNewFile</code> is simply a path to a file, something like <code>/Users/me/Projects/project/test/testSaveFile.mat</code>.

However MATLAB is spitting out the following error which doesn't seem to make any sense:
<pre>
??? Index exceeds matrix dimensions.

Error in ==> TADAInterface>generateTrajectory at 335
            save(trajectoryNewFile, 'trajectory');
</pre>

I'm trying to save a structure, where do indices come into play?  Can anyone tell me what's going on here?

I just need to save the file so that when I use the <code>load</code> command later on it'll load a trajectory with those same properties / values into my workspace.

Thanks in advance!
MATLAB throwing index out of bound error when attempting to save a MATLAB structure.
===

I'm attempting to save a MATLAB structure to a .MAT file.  The structure is composed of the following properties:

<pre>
trajectory =
        time: [2500x1 double]
    position: [2500x3 double]
</pre>

I have the following line of code:

<code>save(trajectoryNewFile, 'trajectory');</code>

Where <code>trajectoryNewFile</code> is simply a path to a file, something like <code>/Users/me/Projects/project/test/testSaveFile.mat</code>.

However MATLAB is spitting out the following error which doesn't seem to make any sense:
<pre>
??? Index exceeds matrix dimensions.

Error in ==> TADAInterface>generateTrajectory at 335
            save(trajectoryNewFile, 'trajectory');
</pre>

I'm trying to save a structure, where do indices come into play?  Can anyone tell me what's going on here?

I just need to save the file so that when I use the <code>load</code> command later on it'll load a trajectory with those same properties / values into my workspace.

Thanks in advance!