Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

** 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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

May 01, 2012
12:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
12:14 AM

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

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

May 02, 2012
01:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

9 REPLIES 9

May 01, 2012
02:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
02:23 AM

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

Mike

May 01, 2012
02:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
02:26 AM

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

May 01, 2012
02:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
02:34 AM

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

May 01, 2012
02:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
02:37 AM

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.

May 01, 2012
04:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
04:56 AM

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

May 01, 2012
04:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
04:29 AM

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

May 01, 2012
11:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 01, 2012
11:48 PM

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

May 02, 2012
01:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 02, 2012
09:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 02, 2012
09:29 AM

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

Talina