The PTC Community is on temporary read only status in preparation for moving our community to a new platform. Learn more here
Hello PTC Community.
I am posting a Mathcad Prime 11.0.1.0 worksheet wherein I am evaluating certain quantities by performing element-wise multiplication and division of column vector variables. I believe that I am not doing this right.
Your help will be appreciated.
In MATLAB, it is .* & ./ for element-wise multiplication and division, respectively.
Both the attached Mathcad & Excel sheets work together.
Thank you for your assistance.
Solved! Go to Solution.
Vectorization makes evry T calculation. But nor sure what you want to do.
Vectorization makes evry T calculation. But nor sure what you want to do.
Excellent! I can always count on my PTC community Brothers and Sisters to share their knowledge and take the time to provide feedback.
Thank you.
Hi - How were you able to add the constant T = 277°C vertical line with the temperature marker?
Hi - I was able to add the vertical marker, but could not figure out how to change the line style on the vertical marker!
Hi, I got this vertical marker line style figured out ... it was in plain sight.
Only the QSL plot remains a mystery!
Thanks.
Hello again -
Thanks for plotting these up.
For some reason, even after vectorization, my QSL variable is not evaluating and plotting as you have shown in your plot.
Any thoughts on that?
Thanks.
Actually QSL is evaluating and also plotting. The blue trace simply looks like its the x-axis because of a scaling problem.
Both QVL and QSL start in the hundreds of Watt, but QVL goes up to 4,8 * 10^8 W, while QSL just up to 2.2*10^5.
If you need both in the same plot you may limit the y-axis to something like 10^5
or you multiply the QSL values by, let's say, 10^3 which is the same as showing them in mW instead of W (which is what ttokoro had done 🙂 )
Perfect. That makes sense.
Thanks again.
Have a good weekend!
As ttokoro already had shown, what you are looking for is called "vectorization" in Mathcad and Prime.>
Vectorization is applied if you want a scalar calculation to be done with vectors element-wise. All involved vectors must have the same size and vectorization does not work recursively.
Prime applies vectorization automatically if the operation is not defined for vectors. So when v is a vector (in Prime only column vectors are considered vectors), Prime applies implicit vectorization if you type v2 but uses the scalar vector product when you use v*v.
Exponentiation (and likewise division) is not defined for vectors, so instead of issuing an error message, Prime automatically applies vectorization. While this is a convenient approach, it also means that, as in the example below for a*a/b, one might initially assume that the calculation is being performed element by element and continue to compute with incorrect results.
Hi,
Now I wonder why the expressions for ge, QBL, and QFL are grayed out!
See attached.
Thanks.
@thodij wrote:
Hi,
Now I wonder why the expressions for ge, QBL, and QFL are grayed out!
See attached.
Thanks.
Looks like you turned off automatic calculation and are in manual calculation mode. So when an expression is edited, the sheet does not update automatically but the edited region and all regions depending on it are greyed out to indicate that they may not show the correct current value.
Once you recalculate the sheet or turn auto calculation on again the regions should update.
Thank you Sir. It is much appreciated.
Have a great week.
Regards,
thodij
