How to convert sine wave signal to square wave in Simulink?

  • Permalink
  • submit to reddit
  • Email
  • Follow


How to convert sine wave signal to square wave in Simulink?
0
Reply as422422 (20) 9/27/2009 12:37:01 PM

See related articles to this posting


I want to convert a sine wave into square wave in Simulink so that i could use counter and measure the frequency. 
How to convert a sine wave signal to square wave in Simulink?
thanks in advance
0
Reply as422422 (20) 9/27/2009 9:51:01 PM

"stime ss" wrote in message <h9nm9d$b1q$1@fred.mathworks.com>...
> 
> How to convert sine wave signal to square wave in Simulink?

Check this 

http://www.mathworks.in/products/matlab/demos.html?file=/products/demos/shipping/matlab/xfourier.html
0
Reply shaun3798 (1) 1/24/2012 2:09:10 PM

Use sign(sine(wt)) 
0
Reply fabian.uriarte (11) 2/13/2013 10:43:01 PM

On Wed, 13 Feb 2013 14:43:01 -0800, fabian.uriarte wrote:

> Use sign(sine(wt))

Well, yeah... but the OP may want to increase the sample rate a bit.
0
Reply anyone 2/14/2013 1:40:11 AM
comp.soft-sys.matlab 203514 articles. 531 followers. Post

4 Replies
456 Views

Similar Articles

[PageSpeed] 13


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

convert square wave to sine in simulink
Hi there. I want to convert a square wave signal to sine with equal frequency in simulink. Who has an idea? Thanks for your help! :-) sorry,typing error! e-mail address: mail@lars-krueger.com Lars Kr�ger wrote: > > > Hi there. > I want to convert a square wave signal to sine with equal frequency > in simulink. > Who has an idea? > Thanks for your help! :-) ...

"Sine Wave" block in Simulink vs "Sine Wave" block in Signal Processing Blockset
Kindly refer to figure below. What is the different between the sinewave generated by "Sine Wave" block in Simulink vs "Sine Wave" block in Signal Processing Blockset (SPB)? I wish to understand the "physical" meaning and difference. I will appreciate if someone can give a "real-world" example in which sinewave generated by SPB is useful. Thanks http://img.photobucket.com/albums/v608/zhaopian/simulink_dsp_sw.png Can someone please help me to clear my doubt? Thanks ...

Converted Sine wave from DC-AC inverter not having the same amplitude as the Square Wave
I have a Inverter with a DC input and output as a Square wave. My aim was to convert this DC input into an AC Sine wave. Therefore, I had placed LC filter at the output of the inverter. I did get a square wave which has the same amplitude as that of the input DC voltage. But when I convert this into a sine wave, the amplitude is decreased irrespective the values I change. The following are the parameters I have used: DC input : 170 V Inverter: 2-arm four diode Universal Bridge (Ideal Switches) PWM Generator: Carrier Frequency (triange wave frequency) : 9000hz Sine wav...

Conver sine to square wave in simulink
hi there, I'm using simulink. My incomming data is sine wave and i need to convert it to square wave. how i make that. Well, for test, i did some thing like, using signal generator i generate sine and then use the FFT but i can't saw any square wave. so, please let me know what to do. thanks deena What is the method you used for converting sine into square. How does fft of sine will lead to square? Infact, if you combine odd harmonics of sine (10 harmonics will do), you may get square. A. Kumar Deena Chow wrote: > > > hi there, > I'm using simulink. My incomming data...

Conver sine to square wave in simulink #2
hi there, I'm using simulink. My incomming data is sine wave and i need to convert it to square wave. how i make that. Well, for test, i did some thing like, using signal generator i generate sine and then use the FFT but i can't saw any square wave. so, please let me know what to do. thanks deena Deena Chow wrote: > > > hi there, > I'm using simulink. My incomming data is sine wave and i need to > convert it to square wave. how i make that. > Well, for test, i did some thing like, using signal generator i > generate sine and then use the FFT but i can't s...

convert sum of two sines to square wave?
Suppose two 16 bit words define the frequency of two sine waves from 0.1Hz to 20 Khz +/-0.1Hz which are then summed, amplified by "infinity" and then clipped, giving a pulsed output. In theory, I think this could be done using a DSP to do everything, but what's the best strategy? Method 1: 1. Store a Nyquist sampled sinewave in Eprom 2. upsample the lower frequency to that of the higher frequency and add together 3. MMmm... this is getting tricky OK. Is there an algorithm that gives us the times for which a sampled waveform crosses zero and whether the gradient is positve or ne...

How to generate Sine wave,saw tooth wave,triangle wave,square wave using equation?
HI expert.. &nbsp; i am new in a Labview programming and attend some conference and seminar from Labview.. i am trying to simulate a Sine wave,saw tooth wave,triangle wave,square wave using equation same like "simulate signal package in labview, because&nbsp; but i need to configure all the variable data inside the equation. .. like&nbsp; x= a sin 2*pi*f*t or x= a sin w*t.. &nbsp; i am using labview 7.0.. can anyone help me please.... Hi Shid, I do not have LV 7.0, but an example program that I would look into is the Function Waveform Generation.vi example.&nbsp; I fo...

how to create a 10%AM signal that module by a square wave? square wave ?
Just like the Title , any suggestion is appreciate! ...

superposition of a square wave over a sine wave
Hi all, I am new to VHDL programming. My task is to generate a high frequency square wave(500 Hz) super positioned over a low frequency sine wave(5 Hz). how can this be achieved in VHDL. I know how to generate both these waves separately, but i dunno how to generate them together and superposition them. i would be thankful if someone could help me in this task. even your valuable ideas will be quite useful for me. thanks On Fri, 30 Jan 2009 12:43:32 -0800 (PST), Shiva <chibi.sub@gmail.com> wrote: >Hi all, > >I am new to VHDL programming. My task is to generate a high frequen...

square wave / sine wave generator
I'm looking for a simple program or method to generate sine waves or square waves at a desired frequency. Thanks for your help Ray RayD wrote: > I'm looking for a simple program or method to generate sine waves or > square waves at a desired frequency. > Have you tried Google? What's your C++ question? On Jun 21, 1:43 pm, RayD <rgdyke...@aol.com> wrote: > I'm looking for a simple program or method to generate sine waves or > square waves at a desired frequency. > > Thanks for your help > > Ray Isn't this a Home Work? RayD wrote: &...

sample a sine wave with square wave
Hi I would like to sample a sing wave with a square wave. Can anyone help me how to implement it in MATLAB On Jul 4, 11:07 am, fas <faisalmu...@gmail.com> wrote: > Hi > I would like to sample a sing wave with a square wave. Can anyone help > me how to implement it in MATLAB In other words I want to convolve a sine with a square wave(rect) > In other words I want to convolve a sine with a square wave(rect) You can create a sampled sine wave using the sin function (the result is a vector). You can create a rectangular wave (vector) by using a hard limiter on a DC shifted si...

Square wave vs sine wave oscillator for mixer
Hi All, I have a 80MHz crystal clock oscillator that I am using to clock ADCs and DACs and an FPGA in a design that I am working on. I also would like to use the same 80MHz clock as the Local Oscillator (LO) reference for a mixer to mix my ADC outputs up from 8-28MHZ to 88-108MHz. Do you know if I can run a square wave into a mixer? or will this cause my issues? Also the mixer requires a LO power of about +10dBm (50ohm). Is there any easy way to get the clock oscillator up to this kinda power level to drive the mixer. Regards, Paul Solomon -- Paul Solomon wrote: ... > Do you k...

build sine wave,sawtooth, square,triangle wave using equation
HI expert.. &nbsp; i am new in a Labview programming and attend some conference and seminar from Labview.. i am trying to simulate a Sine wave,saw tooth wave,triangle wave,square wave using equation same like "simulate signal package in labview, because&nbsp; but i need to configure all the variable data inside the equation. .. like&nbsp; x= a sin 2*pi*f*t or x= a sin w*t.. &nbsp; i am using labview 7.0.. can anyone help me please I believe this is a duplicate post, but here is my response. &nbsp; I do not have LV 7.0, but an example program that I would look into is ...

Simulink sine wave
I need to make a sinusoidal function that will model the movement of the point where wheel touch the ground. Ground is sinusoidal with altitude 0,07m, distance between each high point of the ground is 0,125m. Wheel diameter is 0,25m. Wheel is moving at speed 60km/h. (here's a quick picture: <http://drusek.webpark.pl/matlab.jpg)> hat values i need to put into "Sine Wave"? Thanks in advance. Drusek Anyone...? ...

Sine wave with conditions- simulink
Hi there, I am new to simulink, i am wondering how do i input a sine wave with conditions in simulink. eg. 10sin ( pi*t/0.4) valid for 0=< t =< 0.4 0 valid for 0.4< t =<1 Pls help. thanks JT ...

converting square wave to double
I am trying to pass to square wave signal into math script.&nbsp; I am assumeing that i have to convert the signal into a double.&nbsp; Is this possible?&nbsp; If so how could I convert this signal so it can be passed into math script? Thanks,Leif Which data type does your square wave signal has? If it is a waveform you can get the value as an array of double with the Get Waveform Components primitve. ...

How to convert a sound signal with a dark green wire of a wave file path into a input signal data typ wire?
How to convert a sound signal with a dark green wire of a wave file path into a input signal data typ wire? We want to compare a signal comming from the micro with a sound on the computer? Can somebody pls help us? We are making a guitar, and the VI must compare and find the accords. Our VI is included. Greets from belgium. Geluid.vi: http://forums.ni.com/attachments/ni/170/156235/1/Geluid.vi ...

Count pulses of a sine wave in simulink
I have a sine wave signal generator in Simulink. I want to use some counter block to keep counting the pulses of sine wave signal. Which block I should use? thanks some help please. which block i can use to count the sine wave pulses or alternatively how I can convert the sine wave to square ? (then i can use counter block) ...

simulink: discrete sine wave to array?
Hello I've got a sine wave block generating 16 discrete values for a one period sine signal. How can I put all 16 values into one array? Thank you Sincerely Lore Hi Lore, to have the array in the matlab workspace, use a 'to workspace' block and take the array from the result variable (apply proper simulaion settings for the model in addition -> fixed step, discrete). To have an array in simulink, use cascading 'unit delay' blocks and a 'mux' collecting their outputs. Cheers, Robert > Hello > > I've got a sine wave block generating 16 disc...

Swept Sine Wave signal drift
I am using the "Getting Started with Swept Sine Wave" example which comes with the Sound and Vibration toolkit. As soon as I start running the program the stimulus and response signals begins to drift up to about 4.5 Volts. However, when I connect the the stimulus to an oscilloscope, the oscilloscope reads no drifting in the signal. I am using a PCI-6052E and an SCB-68. Does anyone have any ideas why this is happening? ...

help with simulink sine wave block
for a project i've undertaken,i need to simulate and view a sine wave in the GHz range.the combination of a sine black and a scope doesn't produce the results...how can i view this wave on the scope? deepti rao wrote: > > > for a project i've undertaken,i need to simulate and view a sine > wave > in the GHz range.the combination of a sine black and a scope > doesn't > produce the results...how can i view this wave on the scope? deepti rao, What were your settings for the sim, the sine wave, the scope? -Chris the settings for the sine wave were amplitude...

creating a quasi square wave in Simulink
Hi, I am trying to generate a quasi square wave signal, y=cos(wct+kpm(t)), where fc=960e6Hz, kp=45/ 90/ 120 degrees phase deviation, m(t)=sin (wmt)+sin(3wmt) +sin (5wmt) +sin (7wmt) where fm=100KHz. I tried implementing this equation in Simulink using the sine wave function but received the error: undefined t. Can somebody please let me know how to go about it? Thanking you in advance. ...

Simulink sine wave printing in yellow
the sine wave from my simulink sine wave output is printing in yellow. it is kind of hard to read and i can't find a way to change the color to something more readable. does anyone have any ideas? thanks. Jay ...

Integrating an Sine Wave twice in Simulink
Hello, I am trying to integrate signals from an accelerometer using SIMULINK integrator block.I'm using the SINE-WAVE Block and I'm integrating it twice with 2 Integration Blocks When I integrate a sinus function the first time, there is no problem (get cosinus), but in the second integration I get a graph with negative (or positive) slope.What can I do to get true result. I have searched old post and apply them (high pass filtered to remove long wave using signal processing toolbox, change integrator block initial condition), however no result. I hope you can help me... Cheers, B...