Skip to content

Instantly share code, notes, and snippets.

@johnnyferreiradev
Last active March 28, 2019 00:36
Show Gist options
  • Save johnnyferreiradev/a0c416c64eda61b02b351457adaa4407 to your computer and use it in GitHub Desktop.
Save johnnyferreiradev/a0c416c64eda61b02b351457adaa4407 to your computer and use it in GitHub Desktop.
Comparando duas fuções sen
clear all
clc
f1 = 10; % Frequencia
f2 = 5; % Frequencia
w1 = 2*pi*f1; % Frequencia angular
w2 = 2*pi*f2; % Frequencia angular
t = 0:0.001:1; % Tempo
y1 = sin(w1*t) % Funcao
y2 = sin(w2*t) % Funcao
y3 = y1 + y2
figure(1), plot(t,y1) % Grafico
figure(2), plot(t,y2) % Grafico
figure(3), plot(t,y3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment