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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Leaving out part of sinuscurve

tlauridsen
1-Newbie

Leaving out part of sinuscurve

How do i leave out part of a sinus curve? How do i write it if, i were supposed to leave out the first 45° of this. I have MathCad 14.

Sinus.jpg

24 REPLIES 24

You may define you function either by using the if-statement (Programming palette) or the if() function. Set the function to zero for values of t smaller than pi/4 or set it to NaN if you don't want to see anything in that range.

Is making the function periodic of interest?

WE

I'm not sure I understand it.  Is there anything I should do different in the one i have done? Or should i do it all in another way? I can't find Programming palette.

EDIT: Couldn't see the added files before. I think i understand it now. Thanks a lot

Tommi Lauridsen wrote:

I can't find Programming palette.

If there aren't any additional question you may consider closing this thread-

WE

The sin is the finest Math curve - see please

Video Link : 2202

-MFra-
21-Topaz II
(To:tlauridsen)

      Hi Tommi Lauridsen! I think I have the answer to your problem. Open the attached file with Mathcad 15 or see below.

The range of the variable in your description is not correct.

                                                                         finally

The second picture could be this  if you exchange the two step function as follows:

Wow.. That seems a little tough...

I will look into it tomorrow.. But I'm not sure i have got the right answer yet. If i take to hole cycles(2*T) and I would like leave out the first 45° degrees of each? Like in the first picturer Werner posted? Is that possible somehow? I'm thinking that you somehow can you radians?

Sorry if I misunderstand any of your replys.

-MFra-
21-Topaz II
(To:tlauridsen)

Hello! You can choose the interval that you prefer simply varying tau and delta .

RichardJ
19-Tanzanite
(To:tlauridsen)

If i take to hole cycles(2*T) and I would like leave out the first 45° degrees of each? Like in the first picturer Werner posted?.

Do you mean like this?

A slight modification of Werner's program.

Exactly Richard..

Can you explain to me what the different thins in f3(t) means like t<-t*floor NaN?

Tommi Lauridsen wrote:

Exactly Richard..

Can you explain to me what the different thins in f3(t) means like t<-t*floor NaN?

NaN is a floating point number representation that means Not A Number; it's used where the result is not representable as a floating point number or one of the other special cases (such as infinity).  Mathcad's plot component simply doesn't plot NaN values, which is why Richard used it to omit values from the plot.  (see footnote)

As for t<-t*floor(t*f).   The <- construct is the local assignment operator that Mathcad uses in program.  See image below for more information on floor.

Stuart

Note:

One of the reasons Mathcad has the NaN value is to represent numbers that are missing from a data set.  For example, consider a machine that records the percentage cloud cover throughout the day.  On a nice bright sunny, there will be 0 % cloud cover and when you import the hourly records into Mathcad, then each time index on such a day will have 0 in the coverage column.   Now consider what happens if the machine breaks down for a couple of days (eg, through boredom or attention seeking).  Mathcad will fill any 'empty' cells in an array with zero, but the days in question may have been cloudy.  So rather than use a default value that can affect the statistical analysis, we can use NaN instead of zero to indicate that we didn't have valid data.   Mathcad has a number of functions that will allow you work with NaNs; for example, IsNan, markNan, matchNan and filterNan.

-MFra-
21-Topaz II
(To:tlauridsen)

03.11.2015.png

StuartBruff
23-Emerald II
(To:-MFra-)

Nice sheet, FM.

Here's another option for the periodic case that also doesn't plot the 'missing' points.

Stuart

-MFra-
21-Topaz II
(To:StuartBruff)

In real signals (energy or power) used in electronics the zero return is essential. To leave the function floating at a certain instant or in a time interval also periodically in practice is a mistake. Your solution is useful in other cases but not in the representation of signals (voltages and currents) functions of time.

StuartBruff
23-Emerald II
(To:-MFra-)

F.M. wrote:

In real signals (energy or power) used in electronics the zero return is essential. To leave the function floating at a certain instant or in a time interval also periodically in practice is a mistake.

Largely true, but I'm not sure it's always true.  Consider, for example, a tri-state video opamp

http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=snos789&fileType=pdf

Your solution is useful in other cases but not in the representation of signals (voltages and currents) functions of time.

That depends upon what you what you mean by "representation" of signals.   It may be clearer from an explanatory point of view to show just the part of the signal that it is active, or it may be desired to distinguish between the on and off states.

Stuart

RichardJ
19-Tanzanite
(To:-MFra-)

Your solution is useful in other cases but not in the representation of signals (voltages and currents) functions of time.

It's useful if there are times during which the signal is unknown.

-MFra-
21-Topaz II
(To:RichardJ)

Hello Richard! practically it is the mathematical  representation of the graph of the signal that you see on the display of an oscilloscope.

StuartBruff
23-Emerald II
(To:-MFra-)

F.M. wrote:

Hello Richard! practically it is the mathematical  representation of the graph of the signal that you see on the display of an oscilloscope.

With digital oscilloscopes, there is always the potential option to either not display or differently display an open circuit.  I was playing around with an Arduino and Processing 2 to create a simple low--frequency DSO and one option I was considering was to omit non-connected lines to simplify the display (especially after I then swapped the PC-based Processing display for a tiny Arduino-driven OLED).

Stuart

RichardJ
19-Tanzanite
(To:StuartBruff)

an Arduino ...

... to create a simple low--frequency DSO

I think you should have capitalized the "L" 

StuartBruff
23-Emerald II
(To:RichardJ)

Richard Jackson wrote:

an Arduino ...

... to create a simple low--frequency DSO

I think you should have capitalized the "L" 

If I was being that precise, I'd have had to add a "V" in front of it!

Stuart

By playing with the processor registers, I could do the DAC (with fewer bits) near the top end of the LF band, but I couldn't do much with it due to the overhead of getting the information off the Arduino and into the PC.where Processing attempted to update the screen in (near) real time.   I might have a go with a Raspberry Pi B+ or an external DAC sometime when I'm running out of things to do.

RichardJ
19-Tanzanite
(To:-MFra-)

That's one way to look at it, but only one way. An oscilloscope can't know that it's lost the signal on an input (or maybe there are some top end ones that can, I can't afford them, so I wouldn't know), so it always displays something. A Mathcad worksheet is a lot more flexible.

Dear colleagues! You got carried away and forgot about Tommi Lauridsen!

Яков Рейзенкинд wrote:

Dear colleagues! You got carried away and forgot about Tommi Lauridsen!

Нет, я не забыл. Но Томми, кажется, забыли о нас!


Stuart

Stuart! Thanks for the reply in Russian. I use a translator and is very afraid of being not correctly understood. All the best.

Яков Рейзенкинд wrote:

Stuart! Thanks for the reply in Russian. I use a translator and is very afraid of being not correctly understood. All the best.

Да, я тоже, Яков. Но я учусь русский язык. Таким образом, некоторые из ошибок все мое!


Stuart

Top Tags