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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! 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!

1 ACCEPTED SOLUTION

Accepted Solutions

13 REPLIES 13

24.png

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.

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!

Top Tags