What your program tried to achieve can be done that way:
The assignment in the first line is mandatory, otherwise you would have to use an else-statement to assign the (positive) value of a[w to the Result vector.
The same effect could be achieved using a boolean expression (a>0) and vectorization:
What your program tried to achieve can be done that way:
The assignment in the first line is mandatory, otherwise you would have to use an else-statement to assign the (positive) value of a[w to the Result vector.
The same effect could be achieved using a boolean expression (a>0) and vectorization:
I know it is wrong to use w in this manner becuase the first value is less than origin , however I have to use this function like this. How can I tackle this issue?
Obviously you are trying to use vector elements that are BEFORE the first and AFTER the last, i.e. they do not exist.
Not sure what you are trying to achieve, but from a pragmatic point of view I would say that you have to start your w-loop after the first and stop it before the last possible vector index.
Ooops, we get an error as of incompatible units! Reason is that Prime insists on units for zero values, too. So we have to change the program which replaces negative lengths by zero to replace them by zero meter:
Calculation of b'' now works OK, but of course b'' now has one element less than vector a.
Translate
Windchill Satisfaction Survey
Help shape the future of Windchill. Take our 5-minute survey and share your feedback.