Skip to main content
1-Visitor
October 8, 2019
Solved

stack option

  • October 8, 2019
  • 2 replies
  • 7230 views

Hi, I was trying to stack all the x coordinates together and all y coordinates together. I see an additional value (0,0) in the result w and v. Can you please tell me why is the additional rows generated and how to eliminate it. And i am using mathcad 15

Thank You.

Best answer by LucMeekes
Can't see your sheet...
Maybe because you started indexing at 1, while the default start index is 0?

Luc

P.s. you don't need to zip your file.
Mcd, mcdx and xmcd files can be readily attached. To attach several files, edit your post.

2 replies

LucMeekes23-Emerald IVAnswer
23-Emerald IV
October 8, 2019
Can't see your sheet...
Maybe because you started indexing at 1, while the default start index is 0?

Luc

P.s. you don't need to zip your file.
Mcd, mcdx and xmcd files can be readily attached. To attach several files, edit your post.
25-Diamond I
October 8, 2019

Luc is using Mathcad 11 and so he can't read your file. With MC15 you can resave the file in MC11 format, though (something which is not possible with Prime). I attach the file in MC11 format here.

Attaching the worksheet usually is a good idea and quite often simply necessary. But its also a good idea to attach a screenshot, too 😉

Lucs guess was correct. The setting of ORIGIN in your sheet is the default value 0, so every vector starts indexing with number zero. You created a range variable j which started at 1 and assigned values. So vector element with number 1 gets the correct value 4.5 in, but there still exists a vector element with number 0. This is not assigned a value and so its set to zero by default.

To display the vector y.a you typed y.a[j= which only gives you the elements defined by range j, but not the full vector. If you simply type y.a= you see the full vector with the leading zero.

Rule: If you use a range variable to define vector this range should start with the value of ORIGIN.

Here a small example to demonstrate what happened:

clipboard_image_1.png

 

rizz121-VisitorAuthor
1-Visitor
October 8, 2019

Thank you for the explanation i was trying to eliminate the set of coordinates which are repeated. They coincide with the vertices of the rectangle, by starting the index j from 1 i wanted to eliminate the repetition. can you suggest me a way to remove Capture2.PNG the repeated coordinates?

 

Thank you

25-Diamond I
October 8, 2019

Note sure what you mean. Which vertices, which rectangle?

Do these changes address your problem?

clipboard_image_0.png