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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

1-Newbie

## Value Must Be a Vector/Variable Undefined

I'm currently working on a Mathcad worksheet that adds the sums of two vectors and uses their result to solve an equation, but the variable I have defined to be the solved value keeps giving me the error that it isn't defined. I tried to break formula apart and the vectors are returning the error message "value must be a vector." Any help anyone could provide would be greatly appreciated.

Thank you in advance.

Talina

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby IV
(To:atbarajas)

See please the attach!

9 REPLIES 9
5-Regular Member
(To:atbarajas)

Striaght away I have found that epsilon[conc is not defined.

Mike

Is it not allowed to just be a placeholder in a function?

5-Regular Member
(To:atbarajas)

Ok yes I see. I think you need to go back through the calculation. It looks very complicated and hard to follow.

Instead of making all your equations functions with dependant variables, could you not define the iterated parameters as vectors at the top of your worksheet and work through that way?

Mike

Sadly no. Once I get the functions working, I have to repeat the equation about 8 times to generate a graph. I guess I could use vectors, but it would get messy with all of the iterations - at the time I thought that using functions was the lesser of the two evils.

4-Participant
(To:atbarajas)

There are a few issues that I can see:

1.

ε is first defined as an array & then re-defined as a function.

As a temporary fix I have changed the function to ε1

2.

ε is still causing a problem as it is a single element array while function f.s(ε.conc,c) needs 13 elements.

3.

function F.c is returning a scalar value so the summation in sum.c is unnecessary & confusing Mathcad.

There probalbly are more items to fix but until the ε array is corrected it isn't possible to determine the next step.

Regards

Andy

17-Peridot
(To:atbarajas)

You are trying to combine vectors of different lengths. Firstly, you've defined c and epsilon.c as row vectors (Mathcad isn't really very keen on these - I'd redo them as column vectors if I were you). Secondly, they are a different length from vectors such as A.unc that you are trying to combine them with later.

Alan

1-Newbie
(To:atbarajas)

Thank you all so much for your help. I didn't realize that certain functions were spitting out scalars while others were still producing vectors. I've gone through and modified things so the functions are working as they're supposed to, but the solve block is still returning the error message that the variable is not defined. Any suggestions?

Thank you again,

Talina

24-Ruby IV
(To:atbarajas)

See please the attach!

Ah, I see. Thank you very much for help!

Talina

Announcements
Top Tags