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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

For Loop Code issue

HHHH
9-Granite

For Loop Code issue

I have a task to make the code in the left as written in the right but I have an error as attached appreciate if anyone can help.

 

My Task.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:HHHH)

Only change j to integer.

 

image.pngimage.pngimage.png

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:HHHH)

Look carefully at the error message that Prime gives: "This value must be an integer"

Pw is a vector. You are using j to index into that vector, that means you are trying to point to one element of that vector. Then j must be an integer, a whole number, in the range 0, 1, 2, ...., and it cannot have units.

Now look at how you defined j: it runs from Pp ( a few million Pascals) to sigma (I don't even want to know what that is.)

If you have to recreate the Mathcad file into Prime, be careful about what you change...

 

Success!
Luc

 

ttokoro
20-Turquoise
(To:HHHH)

Only change j to integer.

 

image.pngimage.pngimage.png

Top Tags