Escolar Documentos
Profissional Documentos
Cultura Documentos
FLORIANÓPOLIS- SC
2024
SUMÁRIO
RESUMO....................................................................................................................................i
1 INTRODUCAO.................................................................................................................1
1.1 FUNDAMENTAÇÃO TEÓRICA........................................Error! Bookmark not defined.
1.2 OBJETIVOS...................................................................................................................1
2 RESULTADOS E DISCUSSÕES....................................................................................2
3 CONCLUSÕES...............................................................................................................18
4 REFERÊNCIAS..............................................................................................................19
RESUMO
Abstract: In this paper there will be a presentation on how the mathematical environment
works in Scilab, using this program to answer some questions about mathematical operations
and convolution. Within the questions answered some digits that will be used come from the
numbers of my UK (3997115), so they replace the gaps that are marked. The great difference
of the program is the way it performs the answers, since most of the time only numbers and
equations are used, Scilab works the codebase, so anything written in the wrong way com-
promises the final result.
Keywords: Convolution, discrete signal, subplot and function.
i
1 INTRODUCAO
Grande parte das pessoas tem um conhecimento simples sobre todos os feitos que a
matemática pode fazer, convolução é uma das áreas da matemática que entra nesse contexto.
Nesse relatório iremos perceber como ela pode ser muito bem utilizada e pode facilitar em
várias coisas do cotidiano, principalmente nas áreas que buscam juntar a matemática e a
informática.
1.2 OBJETIVOS
1
2 RESULTADOS E DISCUSSÕES
Como descrito acima, para a resolução das atividades a seguir será utilizado o
ambiente matemático do Scilab.
Será utilizado o RU para a substituição dos valores:
RU1 RU2 RU3 RU4 RU5 RU6 RU7
3 9 9 7 1 1 5
--> n=-10:10;
--> x=9*impulso(n+1)+9*impulso(n)+1*impulso(n-1)+5*impulso(n-2)
x =
column 1 to 11
0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 5.
column 12 to 21
7. 3. 0. 0. 0. 0. 0. 0. 0. 0.
-->plot2d3(n,x)
2
3) Gerar um sinal discreto y[n] = [3 9 9 7 1], onde o número em realcecorresponde ao
valor da amostra em n = 0. O vetor y[n] deve ir de -10 a +10.
--> function [y]=impulso(x)
> y = zeros(1, length(x));
> y(find(x==0)) = 1;
> endfunction
--> n=-10:10;
--> y=3*impulso(n+2)+9*impulso(n+1)+9*impulso(n)+7*impulso(n-1)+1*impulso(n-2)
y =
column 1 to 12
0. 0. 0. 0. 0. 0. 0. 0. 1. 5. 1. 2.
column 13 to 21
7. 0. 0. 0. 0. 0. 0. 0. 0.
-->plot2d3(n,y)
3
4) Calcular e plotar a[n] = 9x[n]. Se 9 = 0 adotar 9 = 2.
--> function [y]=impulso(x)
> y = zeros(1, length(x));
> y(find(x==0)) = 1;
> endfunction
--> n=-10:10;
--> x=3*impulso(n+1)+9*impulso(n)+1*impulso(n-1)+5*impulso(n-2);
--> a=5*x
a =
column 1 to 16
column 17 to 21
0. 0. 0. 0. 0.
--> plot2d3(n,a)
4
5) Calcular e plotar b[n] = x[n].y[n].
--> function [y]=impulso(x)
> y = zeros(1, length(x));
> y(find(x==0)) = 1;
> endfunction
--> n=-10:10;
--> x=3*impulso(n+1)+9*impulso(n)+1*impulso(n-1)+5*impulso(n-2);
--> y=3*impulso(n+2)+9*impulso(n+1)+9*impulso(n)+7*impulso(n-1)+1*impulso(n-2);
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b =
5
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0
6
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0
7
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0
.
0
.
8
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b =
0
.
0
.
9
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b =
1
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
1
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
0.
0.
0.
0.
0.
0.
0.
0.
b=
0.
0.
0.
0.
0.
0.
0.
0.
0.
5.
5.
14.
21.
1
0.
0.
0.
0.
0.
0.
0.
0.
-->plot2d3(n,b)
6) Usando o comando subplot plotar x[n], y[n], a[n] e b[n] no mesmo gráfico.
--> subplot(141)
--> plot2d3(n,x)
--> subplot(142)
--> plot2d3(n,y)
--> subplot(143)
--> plot2d3(n,a)
--> subplot(144)
--> plot2d3(n,b)
1
Atividade 2: Sistemas lineares – Convolução
1) Num determinado sistema tem a seguinte resposta ao impulso h[n]. Se colocarmos um
sinal de entrada definido como o x[n], o sinal de saída será y[n], que é a convolução de x[n]
com h[n].
a) h[n] = [3 9 0], x[n] = [0 0 0 9 9 3 3 9]. Realize a soma de convolução e calcule y[n].
--> function [y]=impulso(x)
> y = zeros(1, length(x));
> y(find(x==0)) = 1;
> endfunction
--> n=-10:10;
--> h=3*impulso(n+2)+9*impulso(n+1);
--> x=9*impulso(n-3)+9*impulso(n-4)+3*impulso(n-5)+3*impulso(n-6)+9*impulso(n-7);
--> y=conv(h,x)
y =
column 1 to 12
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
column 13 to 23
0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 10.
column 24 to 34
26. 6. 6. 5. 0. 0. 0. 0. 0. 0. 0.
column 35 to 41
0. 0. 0. 0. 0. 0. 0.
1
-->n2=-20:20;
--> subplot(131)
--> plot2d3(n,h)
--> subplot(132)
--> plot2d3(n,x)
--> subplot(133)
--> plot2d3(n2,y)
--> n=-10:10;
--> h=5*impulso(n-3)+1*impulso(n-4)+3*impulso(n-5)+1*impulso(n-6)+5*impulso(n-7);
--> x=3*impulso(n+2)+9*impulso(n+1);
--> y=conv(h,x)
y =
column 1 to 12
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
column 13 to 23
0. 0. 0. 0. 0. 0. 0. 0. 0. 3. 16.
column 24 to 34
1
6. 10. 26. 5. 0. 0. 0. 0. 0. 0. 0.
column 35 to 41
0. 0. 0. 0. 0. 0. 0.
--> n2=-20:20;
--> subplot(131)
--> plot2d3(n,h)
--> subplot(132)
--> plot2d3(n,x)
--> subplot(133)
--> plot2d3(n2,y)
--> n=-10:10;
--> h=3*impulso(n+1)+9*impulso(n)+7*impulso(n-3);
--> x=9*impulso(n+2)+9*impulso(n+1)+3*impulso(n)+3*impulso(n-1)+9*impulso(n-2);
--> y=conv(h,x)
y =
column 1 to 11
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
column 12 to 22
1
0. 0. 0. 0. 0. 0. 1. 10. 26. 6. 8.
column 23 to 33
15. 2. 2. 2. 0. 0. 0. 0. 0. 0. 0.
column 34 to 41
0. 0. 0. 0. 0. 0. 0. 0.
--> n2=-20:20;
--> subplot(131)
--> plot2d3(n,h)
--> subplot(132)
--> plot2d3(n,x)
--> subplot(133)
--> plot2d3(n2,y)
2) Para todas as funções anteriores plote x[n], h[n] e y[n] no mesmo gráfico.
Os gráficos foram colocados nas respostas anteriores em baixo dos códigos.
1
Após finalizar podemos perceber como funciona a convolução e como os gráficos ficam
diferentes modificam os valores dos vetores e mudando o vetor 0. Outra coisa que percebi foi
que após a convolação ser feita deve-se dobrar o valor da variável n.
1
3 CONCLUSÕES
1
4 REFERÊNCIAS
https://pt.wikipedia.org/wiki/Convolu%C3%A7%C3%A3o
2
CENTRO UNIVERSITÁRIO INTERNACIONAL UNINTER
ESCOLA SUPERIOR POLITÉCNICA
BACHARELADO EM ENGENHARIA ELÉTRICA
DISCIPLINA DE– SINAIS E SISTEMAS
FLORIANÓPOLIS - SC
2024
SUMÁRIO
RESUMO....................................................................................................................................i
1 INTRODUCAO.................................................................................................................1
1.1 FUNDAMENTAÇÃO TEÓRICA........................................Error! Bookmark not defined.
1.2 OBJETIVOS...................................................................................................................1
2 RESULTADOS E DISCUSSÕES....................................................................................2
3 CONCLUSÕES.................................................................................................................7
RESUMO
Abstract: In this paper, there will be a presentation on how the mathematical environment
works in Scilab, as well as using the programs to answer some simple and basic math ques-
tions. Within the questions answered, some digits that use my RU numbers (3997115) are
replaced as gaps that are marked. The great difference of the program is the way it performs
as answers, since most of the time numbers and equations are used, or Scilab executes a code-
base, so anything written in the wrong way compromises the end result.
i
1 INTRODUCAO
Muitas vezes nos deparamos com o problema que assola muitas pessoas nos dias de
hoje, a dificuldade em realizar exercícios matemáticos com equações mais bem elaboradas,
assim neste relatório iremos por meio de um programa facilitar essa dificuldade. O programa
Scilab, por meio de códigos auxilia na resolução de problemas matemáticos com varias
finalidades, no corpo do trabalho serão respondidas algumas questões que abrangem diversas
funções, dentro delas temos a seno, a cosseno e exponencial. Tendo um conhecimento sobre
essas funções mais básicas pode ser ter base para ir aprofundando seus conhecimentos.
Como podemos perceber no mundo de hoje tudo evolui de uma forma muito rápida,
todos os dias novas tecnologias são criadas para darem comodidade ao ser humano e, dessa
forma, facilitando nas atividades corriqueiras. O Scilab é um programa que tem como base
englobar duas coisas muito utilizadas pelo ser humano: matemática e computação, dentro de
suas finalidades, eles auxiliam o usuário a realizar contas matemáticas das mais simples as
mais complexas e, de maneira conjunta, ambientam um pouco sobre o mundo da
programação.
1.2 OBJETIVOS
1
2 RESULTADOS E DISCUSSÃO
Como descrito acima, para a resolução das atividades a seguir será utilizado o
ambiente matemático do Scilab.
Será utilizado o RU para a substituição dos valores:
RU1 RU2 RU3 RU4 RU5 RU6 RU7
3 9 9 7 1 1 5
2
48. 6. 6.1 6.2
--> t=0:0.1:2*%pi;
--> x=sin((9*%pi/3)*t+(7*%pi/2));
--> t=0:0.1:2*%pi;
--> x=cos((%pi/5)*t+(%pi/1));
3
4) Gerar uma função exponencial crescente x(t) = e^7.t. Se 7 = 0 adotar 7= 2
a) Plotar a exponencial crescente como função contínua e como função discreta em função
de t.
--> t=%t;
--> t=0:0.1:2*%pi;
--> x=%e^(7*t);
4
5) Gerar uma função exponencial decrescente x(t) = e^-7.t. Se 7= 0 adotar 7= 2
a) Plotar a exponencial decrescente como função contínua e como função discreta em
função de t.
--> t=%t;
--> t=0:0.1:2*%pi;
--> x=%e^(-7*t);
--> t=0:0.1:2*%pi;
--> y1=(3*(sin(t)));
--> plot(y1)
5
--> y2=((9/3)*(cos(3*t)));
--> plot(y2)
--> y3=((9/5)*(sin(5*t)));
--> plot(y3)
--> y4=((7/7)*(cos(7*t)));
--> plot(y4)
--> y5=((1/9)*(sin(9*t)));
--> plot(y5)
--> y6=((1/11)*(cos(11*t)));
--> plot(y6)
--> y7=((5/13)*(sin(13*t)));
--> plot(y7)
--> z=y1+y2+y3+y4+y5+y6+y7;
--> plot(z)
6
3 CONCLUSÕES