Skip to main content
1-Visitor
January 29, 2015
Solved

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

  • January 29, 2015
  • 7 replies
  • 12557 views

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.

Best answer by Werner_E

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
January 29, 2015

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.

23-Emerald I
January 29, 2015

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.

Werner_E
25-Diamond I
January 29, 2015

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.

23-Emerald I
January 29, 2015

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.

1-Visitor
January 29, 2015

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