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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Cycle mistake

РГ_7348811
1-Newbie

Cycle mistake

Hello Everybody!

 

I am somewhat new to Mathcad programing but I have faced with the task which required cycles in MathCAD to be solved.

 

The task:

i have a set of functions with the common function variable (tetta), which is defined in the interval  (0-360) with the step =1. And also I have a criterion, I need to crete a cycle which calculates my functions with variable (tetta) from 0 - 360 and the compare all function result with criterion. If it meets criterion conditions the stop calculations and return Pmud. If it does not meet criterion condition do calculation with new Pmud = Pmud + 0.01.

 

See the attached mathcad v14 file with comments.

 

Thanks in advance for your comments!

 

 

 

 

 

 

 

 

2 REPLIES 2

Hi,

The sheet is complicated.

Can you provide some background like a reference or document you are following to aid our understanding on the problem.

Cheers

Terry

You cannot define a function with <- you must use :=.

Capture.JPG

Angles are measured in radians for trigonometric functions,  The use of deg as units is possible.

To get 0 to 360 in half a degree steps use

Capture2.JPG

Enclosed is file that does not work yet but has corrections to the two issues above.

The comparison Capture3.JPGnever compares A(i) only 7

 

Top Tags