Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Using the if statement

cadtelsim
10-Marble

Using the if statement

I'm trying to type this conditional statement and I don't know how to. Could someone please help me type this function? 

I need a comma after V-battery and then an absolute value before the closing bracket, and PTC doesn't let me type that. 

 

VM_10380528_0-1681442039667.png

 

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

VM_10380528_0-1681488124291.png

Hi, 

I tried that too, but still I can't get to what its supposed to be...

View solution in original post

5 REPLIES 5

Hi,

do not use square brackets, use parentheses.


Martin Hanák

VM_10380528_0-1681488124291.png

Hi, 

I tried that too, but still I can't get to what its supposed to be...

and in my book, it is using square brackets. 

Intro to power electronics and motor control page 718.


@cadtelsim wrote:

and in my book, it is using square brackets. 

Intro to power electronics and motor control page 718.


Hi,

please study help pages to understand if command.

https://support.ptc.com/help/mathcad/r9.0/en/#page/PTC_Mathcad_Help/using_conditional_statements.html

https://youtu.be/2kY-pGKPAM0

 

You can also search community web to get more information.

MartinHanak_0-1681628640827.png

https://community.ptc.com/t5/Mathcad/Compound-IF-statement-with-text/m-p/845500

 


Martin Hanák
In this video, we show you how to locate and use a simple conditional "if" statement in Mathcad Prime. After describing its arguments, we'll show you two examples: a very basic one on returning true and false values, and a second example that mirrors a real life engineering solution; conditioning


@cadtelsim wrote:

VM_10380528_0-1681488124291.png

Hi, 

I tried that too, but still I can't get to what its supposed to be...


Hi,

if command syntax in your expression is incorrect, use something like this if(mod(omega*t,pi),"true","false")

MartinHanak_0-1681629241152.png

 


Martin Hanák
Announcements
Top Tags