Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Multiplying a vector with the Tangent of a vector 2

Status
Not open for further replies.

1clown

Mechanical
Sep 19, 2011
13
Hi Guys,
I have a vector and are trying to multiply it with the Tan of another vector and cannot get it to work correctly. The answer I get is the first value in one vector multiplied with the Tan of the first value in the second vector repeated in the answer vector rather than different values for each line of the vector.
I have tried using the vectorise function as well as using a range variable applied to each variable by using the [ button after the variable name and inserting the variable used to define the range variable. This also did not work as I was unable to apply the range variable to the tan function with out geting the error message this value must be a vector. Any help would be appreciated.
Thanks
Kevin
 
Replies continue below

Recommended for you

The sheet might be useful to look at

TTFN
faq731-376
7ofakss
 
I think the problem is that unless set otherwise array origin is 0, and your range variable is from 1 upwards... Go to Tools > Worksheet Options and set Array Origin to 1, I think it will solve your problem. HTH
 
Hi WolfHR, I have my origin set to 1 as I find it much less confusing.
Thanks
 
You misunderstand. Mathcad automatically assumes 0 as the ORIGIN, unless ORIGIN:1 is explicitly stated in the sheet. This that EVERY vector in your sheet starts at 0, regardless of what you attempted to do to X.

Once you fix that, the L.tet.vert=1.47kN for every value, since that's what your sheet makes it.







TTFN
faq731-376
7ofakss
 
Hi IRstuff,
I set my origin in work sheet options to 1 for all of my calculations. Unfortunately I picked a different template when I cut the calcs out of my main document to uploaded and did not adjust the origin. OOPS.
You have, as you pointed out, solved my problem. I had looked at the 2 vectors multiplied together with random numbers in them and expected to get 8 different values for L.tet.vert. When I noticed that I had 1.47kN for every line of the vector I assumed that it had only calculated the first line and repeated it for the rest as if I needed to use the vectorise function. 2nd OOPS.
I had also overlooked the fact that I had previously divided by tan ang and then multiplied by tan ang which will clearly give me the original answer. All very obvious now. Ha Ha
Thanks for you help.
Regards
Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor