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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Function does not work with adding if statement

hgholizadeh
1-Visitor

Function does not work with adding if statement


Hi everybody:

I have got a problem with MathCad. When I define a function without If statement, everything is fine. However, as you can see from attached MathCad file, with adding if statement in my function, an error appers that "this value must be scalar"

Any idea why this happens. I have attached the file.

Thank you

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:hgholizadeh)

Hossein Gholizadeh wrote:


Hi everybody:

I have got a problem with MathCad. When I define a function without If statement, everything is fine. However, as you can see from attached MathCad file, with adding if statement in my function, an error appers that "this value must be scalar"

Any idea why this happens. I have attached the file.

See image below

Stuart

View solution in original post

3 REPLIES 3
StuartBruff
23-Emerald III
(To:hgholizadeh)

Hossein Gholizadeh wrote:


Hi everybody:

I have got a problem with MathCad. When I define a function without If statement, everything is fine. However, as you can see from attached MathCad file, with adding if statement in my function, an error appers that "this value must be scalar"

Any idea why this happens. I have attached the file.

See image below

Stuart

Thank you so much. It works now

StuartBruff
23-Emerald III
(To:hgholizadeh)

Hossein Gholizadeh wrote:

Thank you so much. It works now

No problem.

Stuart

Announcements

Top Tags