Loop with Vectors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Loop with Vectors
Hello,
I'm attempting to use a For Loop to complete iterative calculations for multiple cases. The program that I wrote works fine for single values (scalars), but doesn't work so well with vectors. Results are coming out as scalar when it should be a vector. I could use some help.
Thanks
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You miss the vector index when calling M(delta[i)
Furthermore you have to provide a return value in case M(delta[i) >M.n[i
Try your first solve block (the working one) with the last or last but one values of your vectors to see what i mean.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As far as I can see you opened four threads here in the forum and after posting your question you never came back to comment the answers and close the threads.
This behavior is a bit irritating.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I apologize. I was not familiar with the etiquette on this board. I will endeavor to do better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
use subscript i for delta value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried that. It did not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You miss the vector index when calling M(delta[i)
Furthermore you have to provide a return value in case M(delta[i) >M.n[i
Try your first solve block (the working one) with the last or last but one values of your vectors to see what i mean.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That worked! Thanks!