Using Logical Operators (AND OR)

14 views
Skip to first unread message

Abdulrahman Almutairi

unread,
Mar 12, 2024, 4:24:33 PM3/12/24
to VCell Open Discussion Forum
Hi,

I was able to figure out how to use these logical operators, however, I am not sure if I am using them properly. Whenever I use them, the value of the parameter I specify ends up being 1 in the simulation.

For example, I'd assign the initial condition of a specie to be 10 for x<2, in the simulation the IC would be 1 instead of 10. 

I had noticed this for different types of parameters.

I am wondering if I am using the proper syntax? as I could not find any instructions on VCell or in the forum.

les...@gmail.com

unread,
Mar 12, 2024, 4:30:09 PM3/12/24
to vcell-...@googlegroups.com

Hi Abdulrahman,

Did you use the following expression: 10*(x>2)

The expression x>2 evaluates to 1 wherever it is true and to 0 wherever it is false. Multiplying it by 10 should give you the result you want. If this doesn’t work, please provide more details, like a screenshot.

Best,

Les

--
You received this message because you are subscribed to the Google Groups "VCell Open Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vcell-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vcell-discuss/8e613616-830e-4974-b83a-2ca649c15f00n%40googlegroups.com.

les...@gmail.com

unread,
Mar 12, 2024, 4:52:18 PM3/12/24
to Abdulrahman Almutairi, VCell Open Discussion Forum

Excellent!

Best,

Les

 

From: Abdulrahman Almutairi <a.almut...@gmail.com>
Sent: Tuesday, March 12, 2024 4:51 PM
To: VCell Open Discussion Forum <vcell-...@googlegroups.com>

Subject: Re: [VCell] Using Logical Operators (AND OR)

 

Hi Les,

 

Thank you! I was not using that syntax. 

It works now.

 

Best,

Abdul

Abdulrahman Almutairi

unread,
Mar 24, 2024, 12:18:51 PM3/24/24
to VCell Open Discussion Forum
Hi Les,

Thank you! I was not using that syntax. 
It works now.

Best,
Abdul

On Tuesday, March 12, 2024 at 8:30:09 PM UTC les...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages