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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Loop with Vectors

polarnaut
8-Gravel

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

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:polarnaut)

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.

 

View solution in original post

6 REPLIES 6
Werner_E
25-Diamond I
(To:polarnaut)

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.

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

use subscript i for delta value

 

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

Werner_E
25-Diamond I
(To:polarnaut)

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.

 

That worked!  Thanks!

 

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

Announcements

Top Tags