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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Step Function Issues with MathCAD Prime 8

CM_9573901
4-Participant

Step Function Issues with MathCAD Prime 8

I am using a step function to define the first two values which are slightly different than the subsequent values and was able to do this in MathCAD v15, but I have just moved to Prime 8 and the function no longer works.  The except from MathCAD v15 is shown below.  How do I do the same sort of iterative function in Prime 8?

CM_9573901_0-1682969494466.png

 

1 ACCEPTED SOLUTION

Accepted Solutions


Can you show me how I need to modify my function?

Now that you have finally attached the worksheet, sure:

Werner_E_0-1683040959770.png

 

You may note that you can use different local variable names in he program and are not restricted to the ones used on worksheet level. It has not to be "qo" and "i", but of course you can use the same names. But you have to be aware of the fact, that they are different variables.

 

I am irritated because you wrote that the method you used worked OK in Mathcad 15 - it sure did not! The behaviour is the very same in MC15, too.

 

 

View solution in original post

5 REPLIES 5

The index i on the left hand side does not make much sense. At least it has nothing to do with the local i in the function.

Furthermore your function ist just returning one single value - the last value calculated in the for-loop.

 

We don't see how your variables are defined, what the error message (if any) is, etc.

For further help you should attach your worksheets (Mathcad & Prime) and also make clear what you expect as result.

CM_9573901
4-Participant
(To:Werner_E)

CM_9573901_0-1682979003753.png

 

The output from the q_o function should be the equivalent stress per lamina center and should progressively increase.  For example, I have calculated the first three values where q_o(0) = 0.359 psi, q_o(1) = 1.623 psi, and q_o(2) = 7.175.  The function as it is written in MathCAD Prime 8.0 is returning the last calculated value (in this case q_o(10), which is 27.005 psi, however it is not returning the step by step values that I need as the output.  

 

For the purposes of troubleshooting, I am only using 10 lamina, however when I get the function to work correctly, I will increase the number of lamina until the function converges.  


The function as it is written in MathCAD Prime 8.0 is returning the last calculated value (in this case q_o(10), which is 27.005 psi, however it is not returning the step by step values that I need as the output.  

Yes. sure. The reason for this I already tried to explained in my previous answer.
But there is no difference to Mathcad 15. The same function would return the same undesired result in Mathcad 15 as well.

Use a normal variable on the left hand side of the assignment and add a line to the end of the function which simply says "qo" as the last line, after the loop.

CM_9573901
4-Participant
(To:Werner_E)

I am struggling to figure out what direction you're providing.  Maybe I need another cup of coffee, maybe I need significantly more time working with MathCAD, but I have attached an excerpt from the sheet I am working on.  Can you show me how I need to modify my function?


Can you show me how I need to modify my function?

Now that you have finally attached the worksheet, sure:

Werner_E_0-1683040959770.png

 

You may note that you can use different local variable names in he program and are not restricted to the ones used on worksheet level. It has not to be "qo" and "i", but of course you can use the same names. But you have to be aware of the fact, that they are different variables.

 

I am irritated because you wrote that the method you used worked OK in Mathcad 15 - it sure did not! The behaviour is the very same in MC15, too.

 

 

Top Tags