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

How to convert sine wave signal to square wave in Simulink?
0
as422422 (20)
9/27/2009 12:37:01 PM
comp.soft-sys.matlab 207270 articles. 1 followers. lunamoonmoon (258) is leader. Post Follow

4 Replies
823 Views

Similar Articles

[PageSpeed] 55
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
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
shaun3798 (1)
1/24/2012 2:09:10 PM
Use sign(sine(wt)) 
0
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
anyone
2/14/2013 1:40:11 AM
Reply:
Similar Artilces:

US-TX-Austin: Product Mgr/Mkt Eng., 5+yrs mixed-signal/wireless, Eng/Design exp; (45333932405)
US-TX-Austin: Product Mgr/Mkt Eng., 5+yrs mixed-signal/wireless, Eng/Design exp; (45333932405) ============================================================================================== Position: Product Mgr/Mkt Eng. Reference: SMC01828 Location: Austin TX Duration: Perm Skills: 5+yrs exp in mixed-signal, wireless component industry Engineering/design experience, an interest in transitioning to marketing Masters in Electrical Engineering or Bachelors in Electrical Engineering with graduate studies in...

How to convert xls2pdf How to convert xls2txt
a. Where would there be a converter by email for xls2pdf ..xls to .pdf b. or a coverter by email for xls2txt ..xls to text c. where you send the .xls attachment by email and get the conversion by email d. or even preferable you can send the .xls attachment by email and read it at a web link. Hi Don Don Saklad wrote: > a. > Where would there be a converter by email for > xls2pdf > .xls to .pdf > > b. > or a coverter by email for > xls2txt > .xls to text There are others a lot more prone to answer this one, but: XLS, as I understand it, really IS text, so mayb...

Convert xml to xls?
Hi all, does anyone know about an open-source tool or method that can convert a certain xml file to a spreadsheet (e.g. xls)? Can one import xml data in the OpenOffice program Calc? The problem is that the original xml file can be very long and the digit precision of some data fields is strictly required. Thanks a lot! Jie On Oct 21, 3:16=A0pm, Jie <Jie....@gmail.com> wrote: > Hi all, > > does anyone know about an open-source tool or method that can convert > a certain xml file to a spreadsheet (e.g. xls)? Can one import xml > data in the OpenOffice program Calc? The p...

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: &...

Complex downconverters for signals at Fs/4
Hello all, I am on the verge of implementing the DSP Trick "Complex downconverter for signals at Fs/4 and 3Fs/4", from Allan Herriman, posted in the trick sections of dspguru.com. Here is the link to the trick: http://www.dspguru.com/comp.dsp/tricks/alg/cpxdown.htm To do this, I will be using a simple FPGA. My question is about the final notes of the trick, and i quote "an frequency errors in the input signal will be present during filtering". I would like to know what Allan meant when he wrote this. Basically, i there is a variation in frequency of the input signa...

I need a good sas dataset to html converter
I need a good sas dataset to html converter. Does anyone have any links to code that can do this? ...

convert m-file to simulink
How can I convert m-file which consist of ANN(Artificial Neural Network) to simulink block for simulation? Please do reply as soon as possible. Hi, you can use your m-file in Simulink with the user-defined functions. There is a Block matlab-fcn there. Inputs can be taken from source blocks, outputs can be visualized in sinks, as e.g. scopes. regards badariah mahbob wrote: > > > How can I convert m-file which consist of ANN(Artificial Neural > Network) to simulink block for simulation? > > Please do reply as soon as possible. "badariah mahbob" <bardzcomel@...

Convert Current Time to Dec
Sorry, This should be simple, but brain is hurting... How do I convert a Current Time to a Decimal 6,0 (HMS)? There must be a cleaner way then this: Insert into Table Values Dec( Substr(Char(CURRENT TIMESTAMP),12,2) || Substr(Char(CURRENT TIMESTAMP),15,2) || Substr(Char(CURRENT TIMESTAMP),18,2) ,6,0) TIA, Chris Take a peak at HOUR(), MINUTE(), and SECOND(). DEC() can also be used directly on the timestamp. integer(dec(current timestamp) - dec(current date) * 1000000) or round(dec(current timestamp) - dec(current date) * 1000000, 0) Simply use ...

Running m-file from simulink
Hi, I am new to Matlab/simulink. I have implemented a model which performs some calculations by taking some inputs from the GUI (I have used a slider to change the input values to be given to the model) and display the output on the GUI. I use sim("modelname") command to run the model. I have made the simulation time in the model as 10 seconds. Now, when I run the program and change the input values from the slider, I can watch the output change but not as expected. I feel that the model resets after sometime and hence the output is not as expected. I would like to know if there i...

converting cd server into file server
I have a procom CDT-21 21 bay scsi cd tower. I would like to change it into a file server by removing the scsi cd drives an replacing them with scsi hard drives. can this be done? I already have 14 scsi hard drives laying around and also have server 2000 os to put on it. any answers would help. thanks, Dweb ...

Event triggers in Simulink?
Hi! I'm programming a GUI able to control a Simulink model (setting the parameters for the functions recalled by each and every block). The problem is, the GUI has to continuously check the current selection (i.e. the block selected), to let the user to change the parameters of the corresponding function. Is there a trigger activated when the user select another block, avoiding the control cycle to verify if the selection is changed or not? Thank you! Nicola Tateo wrote: > > > Hi! > I'm programming a GUI able to control a Simulink model (setting the > parameters for th...

VBA for batch convert e00
Any one had made a vba program which using for convert e00 to shp? because I have a lot of e00 files it need to convert to shp and then open by arcmap! Eric Hi Eric, > Any one had made a vba program which using for convert e00 to shp? because I > have a lot of e00 files it need to convert to shp and then open by arcmap! If you don't mind using a 3rd party product, our FME can do this in a number of ways. You could just use our "batch translate" option and a couple of clicks later you'll have everything in shape files (or even personal geodatabase...

[Info-Ingres] views and E_US100F String cannot be converted to numeric
--_000_57765A44B573A747BAEC13DBB1E209AD049F66BEEXCH1ctsuoxacuk_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-WatchGuard-AntiVirus: part scanned. clean action=allow Hi All, I have a distributed database which has a native view (named all_box_store)= which is a select with many union all's of several registered tables. If I run the query... select * from c_slot_allocation a where a.box_cid not in ( select s.box_cid from all_box_store s where a.project_cid =3D s.project_cid and a.rack_cid =3D s.rack_cid and a.slot_p...

converting HH:MM to a decimal
I have 3 pairs of time in/out (24 our clock) that I need to calculate the decimal equivalent of the total time worked for that day. example: time in/out 08:00 10:00, 10:15 12:45, 13:45 16:50 if I use a simple select of time_out �time_ in I get 2:00, 2:30, 3:10 respectfully, or 7:35 total hours. That is 7.58 in decimal. Now how do I change the total hours of 7:35 to a decimal of 7.58 in a single SQL statement? Or will I have to write a proc that does this? ...

"cannot convert from the charset" error message
wx 2.5.5, Gtk2, unicode, static lib, suse 9.3 when I run my application I get the a dialog box with the following message : "cannot convert from the charset '@LOCALE, UTF-8, ISO-8859-15, CP-1252!" Except this dialog box my program seems to work fine looking through the wx source code I seem to find this error inside *wxCSConv::DoCreate() function (file common/strconv.cpp) anyone experienced this error message before ? any quick fixes on linux besides turning off the logging with wxNullLog ? Any idea why exactly do I get the message ? Thanks, Andrei On ...

convert list of strings to set of regexes; convert list of strings to trie
Hello, I need a function that converts a list into a set of regexes. Like so: string_list = ["blaa", "blab", "raaa", "rabb"] print string_list2regexes(string_list) This should return something like: ["bla(a|b)", "ra(aa|bb)"] I am aware of the fact that converting the list to a *trie* would almost do the job. But I couldn't find anything about Python modules that produce tries. Are there any modules that I could use? Or do I have to implement it myself? Klaus [Klaus Neuner] > I need a function that converts a li...

CDMA matlab code to transmit 5 different signals
hi I need matlab code for a CDMA system that enable to transmit five different signals to different ground station at the same time. would you please help me? On Wednesday, September 5, 2012 7:37:08 PM UTC+5:30, reyhaneh azad wrote: > hi > > I need matlab code for a CDMA system that enable to transmit five different signals to different ground station at the same time. > > would you please help me? ...

PV Systems Modeling On Simulink
Good morning fellow MATLabers... I am doing research on PV (Photovoltaic) System Degradation on panels... I was wondering if any of you know of any Simulink library that can be downloaded or that is available to Simulate the PV Systems. Next I was wondering if anybody can guide me on how to create my own library or modify existing libraries to do exactly what I need. Thanks "Albert " <aleytevidal@gmail.com> wrote in message <h350hp$d0s$1@fred.mathworks.com>... > Good morning fellow MATLabers... > > I am doing research on PV (Photovoltaic) System Degradatio...

The problem with the strings Convert each other
Hello all, &nbsp; &nbsp; Could you help me to&nbsp;solve the following problem using LV7.1? Thank in advance. &nbsp; &nbsp; How can I convert&nbsp;a string of "hexadecimal value"&nbsp;with Normal display style to&nbsp;other string of " the same hexadecimal value"&nbsp;with&nbsp;Hex display style? &nbsp; Best regards, Evan_Lv&nbsp;&nbsp; Here's a more compact alternative. Same result and same precautions. (It acts a little bit differently if you string has e.g. spaces between hex paris.) <img src="http://forums...

Lotus 123
Using Lotus (release 9.6 for Windows) I have some dates entered as a fraction (11/1993) and can display them as a number (0.0055) or as a fraction (11/1993). I would like to convert the fraction to text "11/1993" and then split it into the month and year. I know how to split the text, but can't find a way to convert the original entry to text. Any ideas? TIA Arthur "Arthur Hass" wrote... >Using Lotus (release 9.6 for Windows) I have some dates entered as a >fraction (11/1993) and can display them as a number (0.0055) or as a >fraction (1...

Need help decoding digital signal
I've got a 'mystery signal' I recorded. I'm not sure how it is encoded. I've got pics showing what the wave form looks like. I also have a sample wave file. http://www.cravenfamily.com/roller/page/pcraven/20040814#how_is_this_signal_encoded The few people I've talked to that are familiar with digital communications didn't recognize the encoding. Any insight would be appreciated. Paul Vincent Craven paul@cravenfamily.com Hello Paul, A big part of solving the mystery can be had by telling us how and where you got this signal. It seems to basically have 4 levels b...

converting W*dows like pathnames to file:///
Hi everybody, I want to convert W*dows like pathnames to browser compatible links usind sed like "C:\Documents and Settings\whatever" to "file:///C:/Documents%20and%20Settings/whatever" The second one could be used in W*dows and Linux as well cause Linux allowing links to be named with an ":" in it (at least my Linux [Debian] does) , so /C:/ could be a link to /mnt/hda1 and so on. Unfortunately I cannot code that little bit in sed. :-( Problems: "\" and "/" both have special meanings Converting " " to "%20" Converting Ge...

how to convert GO TO (Fortran) to Matlab
Hi all, Again, I need your share if you have experience in converting Fortran to Matlab. I have Fortran code working with NCL graphic library. However, I am not successful to run this fortran code in my windows PC (under cygwin). It works perfectly in LINUX, but I want to work only in one PC (windows). Therefore, I plan to convert this fortran to Matlab code, but I got problem to convert GO TO in Fortran to Matlab. For example: DO 250 IX=1,NX-1 X1=XMIN+(IX-1)*DX X4=X1+DX X2=X1 X3=X4 C IF(X1.LT.PX1.OR.X4.GT.PX2)GO TO 250 R1=DAT(IX,IY+1) ...

Question about converting data
hi everyone, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i am working on my senior project. i have previously post some of my question. however, it seems that after a while, no one will reply my post anymore. Therefore, i decided to make a new post. i am using labview 8.2 and trying converting the data from the sensor.&nbsp; Once the sensor is powering on, it keeps sending its measuring value to the computer through the srial port. The use&nbsp; hi and lo bytes represent a value, and I have to read pull out the last 7 bit from hi and low bytes and put them together (so we have ...

Converting movie to image
I want to convert a video file to image, the video file is in 3.GP to image file of Jpg. anyone with useful suggestions and code on how to do this ...