Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: Subtract every value in a vector from another vector

$
0
0

I am confused, too, as to what you want to achieve. To create a vector consisting of the difference of the corresponding values in two vetcor, you simply have to subtract those vectors. No need for programming loops, not even range varaibles, as you did.

It looks like you have done in the sheet exactly what you demanded, so whats the problem? Is it that the minimum of  XDIFF is shown as 0 ft while it should be 0.397 ft? This is because you did not consider that Mathcad numbers vector elements beginning from 0 by default. Your range variables are running beginning with 1, so your vectors have an additional element number 0 with the value 0.

You may set the system variable ORIGIN to 1 it you really want to do it the way you did or leave it at the default 0 and change your range varibles and some calculations to fit the new numbering. I prefer leaving ORIGIN at 0 - see atchment.

 

1.png


Viewing all articles
Browse latest Browse all 12488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>