1 / 13

Scilab

Scilab. Revisão – parte1. Vetores e Matrizes. Vetor Linha u = 0:3 = [0 1 2 3 ] Vetor Coluna u = [0; 1; 2; 3]. Funções. function [varRetorno1, ... , varRetornoN] = nomeDaFuncao(param1, ... , paramN) // corpo da função end function. Definindo função degrau. function[v] = degrau(t)

torie
Télécharger la présentation

Scilab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scilab Revisão – parte1

  2. Vetores e Matrizes Vetor Linha u = 0:3 = [0 1 2 3 ] Vetor Coluna u = [0; 1; 2; 3]

  3. Funções function [varRetorno1, ... , varRetornoN] = nomeDaFuncao(param1, ... , paramN) // corpo da função end function

  4. Definindo função degrau... function[v] = degrau(t) v = []; b = size(t); for u = [1:b(2)] if (t(u)>=0) then v = [v 1]; else v = [v 0]; end end endfunction Obs.: Nome de variável e função: SEM ACENTOS!

  5. Operações com Sinais • Time Reversal φ(t) = pe(-t) • Time Shifting φ(t) = pe(t - 1) • Time Scaling φ(t) = pe(2.5*t) Função Plot: plot(t,degrau(t),color(“red”))

  6. PolinÔmios • poly([roots], ‘v’) | poly([coef], ‘v’, ‘c’) p = poly([1 2], ‘s’) p = 2 - 3s + s2 q = poly([1 2], ‘s’, ‘c’) p = 1 + 2s • roots(q)

  7. Análise de sistema contínuos (D2 + 3D + 2) y(t) = D x(t) D = poly(0,'D') P = D Q = D^2 + 3*D + 2 sysPol = syslin(‘c’, P, Q)

  8. syslin(‘dom’,num,den) sysPol = syslin(‘c’, P, Q) linspace(start, end, numberOfSteps) t=linspace(0,10,500)

  9. Simulação da convolução Covolução com Impulso: impresp = csim(‘imp’, t, sysPol) Covolução com Entrada qualquer: res = csim(<função entrada>, t, sysPol)

  10. Exercicio 1: Defina o sinal x(t) abaixo e aplique as seguintes operações. Obs.: use cores diferentes para melhor visualização das transformações. a)x(t-4) b)x(2t) c)-x(-t)

  11. Exercicio 02: Defina a função h(t) especificada pela equação abaixo e simule a covolução dela com a função definida no exercicio 1. (D2+6D+9)y(t) = (2D+9)x(t)

  12. Terminando • Comando help; • Referências http://www.scilab.fr/doc/intro/intro.pdf http://www.scilab.fr/doc/signal.pdf http://www.scilab.fr/doc/lmidoc/lmi.pdf http://scilab.org/

  13. Dúvidas huv@cin.ufpe.br

More Related