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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

submission of various value

ptc-5263419
1-Newbie

submission of various value

Capture.JPG

I'm a new user.

What can I do to make the result show the first line and last line only? Thanks in advance!

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:ptc-5263419)

13 REPLIES 13

24.png

Werner_E
25-Diamond I
(To:ptc-5263419)

Looks to me as if your goal is vector addition, right?

So you would not use range variables but rather vecors. You can use Ctrl-M to insert a vector/matrix or chose the approprate symbol in the Vector&Matrix toolbar.

VectAdd.png

Insteaad of range variables, make X and Y vectors. Maathcad will then add element by element.

First of all, thanks Valery, Werner, Fred;

actually, the situation here is mostly like below, I simplified it in my orginal post:

X:=5,10...10

E:=2,4...4

f(a):=a+1

f(X)=

6

11

g(b):=b+5

g(E)=

7

9

h(a,b):=f(a)+g(b)

h(X,E)=

13

15

18

20

anyway to display the result

h(X,E)=

13

20

only?

appreciate your kindness help!

You can still get the result using vectors.

Fred, would you capture a picture for me?

I'm not able to use the software rightnow, thanks very much. I'll check it tomorrow in office anyway.

Werner_E
25-Diamond I
(To:ptc-5263419)

16.09.png

Hi Werner, Thanks a lot!

Capture.JPG

Would anyone tell me what's wrong with my formula? why I cannot get the black value?

John Crane wrote:

Capture.JPG

Would anyone tell me what's wrong with my formula? why I cannot get the black value?

When Mathcad multiplies two vectors of the same size together the result is a scalar (the sum of the products of matching terms). In your case this is then multiplied by a third vector resulting in a vector. I guess you just want all three corresponding values to be multiplied together for each vector position. To do this put a vector bar over the product (the arrow from the Matrix menu), or set up a range variable that goes from 0 to 3 and use this as a subscript on each term.

Alan

PS Post a worksheet, not just a picture.

Attached file, thanks in advance.

See attached

Alan

Awesome! You save my day! Thanks!

Announcements

Top Tags