MATLAB Program for Plotting Two sine waves Connected Together

MATLAB Program for plotting Two sine waves connected together, one of which has twice the frequency of other.


%Two sine waves connected together,one of which has twice the frequency of other
%provided by
clear all
fr= input('Enter frequency in Hz:');
stptime = input('Enter Stop time in Second:');
frad = 2*pi*fr;           
t = 0:0.005:stptime;                   
y1 = sin(frad * t);       
hold on
y2 = sin(2 * frad * t);
xlabel('Time (seconds)')          


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need fund to operate the site, and almost all of it comes from our online advertising.

Please add to your ad blocking whitelist or disable your adblocking software.