Skip to main content
1-Visitor
Sep 7, 2023 12:08 AM UTC
Question

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

terryhendicott
21-Topaz II
Sep 7, 2023 7:43 PM UTC

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

Translate
terryhendicott
21-Topaz II
Sep 8, 2023 10:45 PM UTC

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

 

Translate