Skip to main content
1-Visitor
Jan 29, 2015 2:09 AM UTC
Solved

"This Value Must Be a Function"--Issue with Prime 3.0

So, I'm completely new to Mathcad and am literally using it for my first time ever for a grad assignment. I am having difficulties with a couple of things in particular.

First, and most importantly, I am getting an error which states "This value must be a function." Having defined the term and function in question previously, I am just not sure where I'm going wrong. I'm sure it's something easy about how I'm typing it in or what I forgot to do, but I need someone more experienced to help me out.

Secondly, in the "error 2" worksheet attached, I am getting an error about incompatible units. If anyone could help me with one or both of these errors, I'd greatly appreciate it. Sorry for my lack of knowledge of the program.

Werner_E
Werner_EAnswer
25-Diamond I
Jan 29, 2015 10:23 AM UTC

1) You have to type a multiplication sign between "w" and "(", otherwise a fuction w(..) is assumed. After you correct this error ou then run into a unit mismatch - check your formulas.

2) In your program body you have used the vector index when you typed L_h but you should have used the literal index. There is also a unit mismatch in the second ("parabolic") part of your routine where you try to add an area and a length.

Furthermore I guess that in the first part you should not use "if ... if .. else ..." but rather "if.. else if ... else..."

P.S.: You don't have to apology for lack of knowledge.

7 replies

Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Jan 29, 2015 10:23 AM UTC

1) You have to type a multiplication sign between "w" and "(", otherwise a fuction w(..) is assumed. After you correct this error ou then run into a unit mismatch - check your formulas.

2) In your program body you have used the vector index when you typed L_h but you should have used the literal index. There is also a unit mismatch in the second ("parabolic") part of your routine where you try to add an area and a length.

Furthermore I guess that in the first part you should not use "if ... if .. else ..." but rather "if.. else if ... else..."

P.S.: You don't have to apology for lack of knowledge.

Translate
23-Emerald I
Jan 29, 2015 11:13 AM UTC

You didn't define e_c (that I could see), but you happened to choose one of the built-in constants in Mathcad; = 1.603*10^-19 C.

Your equation expects a length, so you got an "incompatible units" flag.

Translate
Werner_E
25-Diamond I
Jan 29, 2015 11:38 AM UTC

Fred Kohlhepp wrote:

You didn't define e_c (that I could see), but you happened to choose one of the built-in constants in

e_c is the second argument of the function profile() and it is passed the worksheet variable e which is a lenght. So I guess that this part is OK.

Translate
23-Emerald I
Jan 29, 2015 3:50 PM UTC

My point was that e_c has a preassigned value and unit (which is not a length) It was never defined as a length in the sheet, so it causes a conflict in the function.

Translate
1-Visitor
Jan 29, 2015 7:32 PM UTC

Thank you both a ton. I see my mistakes very clearly now. Hopefully it'll be smooth sailing for the rest of the assignment!

Translate