Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
How i can fix the above problem. iam trying to prove if elements delta matrix ( 10x1) are less than B =matric elements
Hi,
what do you want to compare?
hi,
I want to get the matix ( 10X 1) which says "0K" , if B >DELTA. My apologies new to mathcad
Regards
Hi,
Simply subtract B-Delta. Now comparing negative and positive numbers.
Cheers
You were already thinking in the correct direction when you tried to apply vectorization.
You would have to vectorize the whole small program part
but unfortunately Prime does not allow to vectorize a comparison operator like "<" and throws an error.
One possible workaround is to define a function which compares two element (chose any names, I had chosen x, y) and call that function vectorized with your two vectors
Another option would be to do the vectorization yourself using a for-loop
Or you can achieve the same using a range variable
So chose what fits your needs best. Personally i would prefer the first way with the utility function as it could also be used multiple times in a sheet with different vectors. There is also no need to define a vector B with all the same values if you just want to compare against one constant value:
You may want to chose a better name for that utility function as "check" is too generic and does not hint at what the "check" would consists of.
And if you can be happy with 1 and 0 instead of "OK" and "NOT OK" you could simply use
or 🙂
For future questions: Always attach your worksheet as well and state, which version of Prime you are using.
this is awesome .Thanks a lot
Regards