Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with the use of vector elements in Given-Find block

Status
Not open for further replies.

Pederator

Mechanical
Nov 23, 2012
45
Hello all,

I have such a problem - I want to use vector elements variables, ie. x[1 instead of x.1 in the Given-Find block, but I can not, because I get "Something is wrong with the solve block used to define this function" error. Anybody know why I can not use vector elements variables? I have also noticed that ie. if I write x[1 = 1 and in the next line x[1 = 2 Mathcad redefines previously defined variable, but there is no green underline and no "This expression redefines a previously defined variable" inscription, as it is when typing x.1 = 1 and then x.1 = 2. I use MC15.

Thanks in advance for help.
Pederator
 
Replies continue below

Recommended for you

It just doesn't. You should define the solve block with a single variable and assign the find to a function, ala,

fcn(x) := find(y) and then pass your vector to x

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
 
Can you please attach an example or explain more detailed? I used to assign Find to a column vector, ie. (origin 1)

|x[1|
|x[2|:=Find(x.1,x.2,x.3)
|x[3|

Thanks for help.
 
why can't you do X := find(x.1, x.2, x.3) and then access the elements with X[1, X[2, X[3

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
 
Because i ususally find elements that are not started from 1, and also these are various variables, ie. m.4, m.7, m.8, m.9, h.7, h.9 etc. Above was just an example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor