Quantcast
Channel: PTC Community : Discussion List - PTC Mathcad
Viewing all articles
Browse latest Browse all 2936

Switch statement in Mathcad Prime

$
0
0

This is in relation to the product idea: Switch Statement in Mathcad Prime, that for some reason I cannot vote for (nor against), possibly because I have no active maintenance contract with PTC...

 

The switch statement is not needed. Here's an example of the same functionality (in Mathcad 11, bet it works also and likewise in Mathcad 15 and Prime):

Note that Mathcad (Prime alike) normally works with reals, possibly complex, or even vectors and matrices, rarely with integers.

The only occasions where integers are required are in indexing vectors and matrices. It doesn't even require integers with the summation operator:

So instead of the switch statement, formulate your problem using an array.

 

Luc


Viewing all articles
Browse latest Browse all 2936

Trending Articles



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