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

Graphing/vectors with 'if' statements

$
0
0

Just trying to familiarise myself with MathCAD, and start the process of converting from Excel...

 

As a practice problem, I'm trying to graph a functions which involves an 'if' statement: tractive effort (force) determined either by a maximum (limiting) value, or by dividing the available power by speed, whichever gives the lower value.

 

In Excel I'd use a 'min()' function at each point, but this isn't going to work in MathCAD because it will look at the whole of my speed vector (for plotting) and find the single minimum value.  Therefore I'm using an 'if - otherwise' statement to define my function for tractive effort.  This works for any individual speed value, including a single index of my speed vector, but won't accept the full vector to generate a graph.

 

At least the units seem to be behaving themselves!

 

TEvsSpeed.png

 

How should I be approaching this?


Viewing all articles
Browse latest Browse all 2936

Trending Articles



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