cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Periodic Function Plotting

sgarg
1-Visitor

Periodic Function Plotting

Hi

I have been through many posts but i am not able to plot the attached expression. Can you please tell where i am doing mistake?I am expecting a periodic square waveform toggling between +/-24V with on and off period 5us.

Here I used Ton,Toff as a cons; x as a variable and Vlp(x) as a function.

<Unfortunately when instead of Variables I used to substitute assigned Numerical value it works>

Conditional+function.pngdsafsd.png

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:sgarg)

SAMEER GARG wrote:

Hi

I have been through many posts but i am not able to plot the attached expression. Can you please tell where i am doing mistake?I am expecting a periodic square waveform toggling between +/-24V with on and off period 5us.

Here I used Ton,Toff as a cons; x as a variable and Vlp(x) as a function.

<Unfortunately when instead of Variables I used to substitute assigned Numerical value it works>

? I thought we'd looked at this before?  You need units in your conditional terms and you need to multiply x by microseconds in the Vlp function in the plot.

Stuart

View solution in original post

4 REPLIES 4
RichardJ
19-Tanzanite
(To:sgarg)

Assign x as a range variable over the desired range of the plot.

Fred_Kohlhepp
23-Emerald I
(To:sgarg)

By default, when you don't specify a range, Mathcad will plot x from -10 to 10 (IIRC).  Evaluation of your function for a negative number fails, causing your error.  Richard's fix is the correct answer.

StuartBruff
23-Emerald III
(To:sgarg)

SAMEER GARG wrote:

Hi

I have been through many posts but i am not able to plot the attached expression. Can you please tell where i am doing mistake?I am expecting a periodic square waveform toggling between +/-24V with on and off period 5us.

Here I used Ton,Toff as a cons; x as a variable and Vlp(x) as a function.

<Unfortunately when instead of Variables I used to substitute assigned Numerical value it works>

? I thought we'd looked at this before?  You need units in your conditional terms and you need to multiply x by microseconds in the Vlp function in the plot.

Stuart

Hi StuartBruff

Thanks a ton.

This really works. Sorry i was not getting reply so that is why i posted in other threads as well.  Next time i will make patience.

Announcements

Top Tags