Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hey everyone,
I've developed a loop where each value in the loop is a vector (e.g., x1 = 30 X 1 vector) so the loop should be returning vectors as well. Unfortunately, I'm getting scalars therefore ruining the later functions of the loop. I've narrowed it down to the portion that is returning scalars, and I was wondering if someone could help me figure out why it's doing this. I've attached the file that has been causing me grief for the past week.
Any help is greatly appreciated.
Talina
Solved! Go to Solution.
On the rhs of the on error you also need the local assignment to Phat[i
On the rhs of the on error you also need the local assignment to Phat[i
Ah, thank you so much! You saved me several additional hours of grief.
Talina Barajas wrote:
Hey everyone,
I've developed a loop where each value in the loop is a vector (e.g., x1 = 30 X 1 vector) so the loop should be returning vectors as well. Unfortunately, I'm getting scalars therefore ruining the later functions of the loop. I've narrowed it down to the portion that is returning scalars, and I was wondering if someone could help me figure out why it's doing this. I've attached the file that has been causing me grief for the past week.
Any help is greatly appreciated.
Talina
Your loop variable runs from 0 .. 3, but you've only got 3 elements in each of udot and udotdot so the loop crashes at i=3. Change the range from 0..2.
Stuart