cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Loop with Vectors

SOLVED
Regular Member

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

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Loop with Vectors

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.

 

6 REPLIES 6

Re: Loop with Vectors

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.

Highlighted

Re: Loop with Vectors

use subscript i for delta value

 

Re: Loop with Vectors

I tried that.  It did not work.

 

2019-09-10 11_12_45-PTC Mathcad Prime 3.1 - C__Users_g5fmxbnm_Desktop_Telework_Telework Working File.jpg

Re: Loop with Vectors

I apologize.  I was not familiar with the etiquette on this board.  I will endeavor to do better.

Re: Loop with Vectors

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.

 

Re: Loop with Vectors

That worked!  Thanks!

 

2019-09-10 14_23_03-PTC Mathcad Prime 3.1 - C__Users_g5fmxbnm_Desktop_Telework_Telework Working File.jpg