Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dir = "C:\Users\gmone\Documents\Faculdade\Automação e controle"
- //função que corresponde a curva do sistema
- function A=ce(t)
- A=(-%e**-t)*(cos(sqrt(15)*t)) - (1/sqrt(15)) * (%e**-t)*sin(sqrt(15)*t)+1
- endfunction
- function A1=cm(t)
- A1=18.76 *((-0.0315639 +0.011773*%i) * (%e**((-1.87724-3.52027*%i) * t)) * ((0.755722 + 0.654893*%i)+ (1) * (%e**((7.04053*%i) * t))) + 0.00983607 * %e**(-362082 * t) + 0.0532917)
- endfunction
- t=0
- i=0
- clear B
- clear C
- clear T
- while t<=8
- i=i+1
- t=t+0.1
- B(i) = ce(t);
- C(i) = cm(t);
- T(i)= t;
- end
- subplot(2,2,1)
- xtitle( 'Função da questão E', 'T', 'c(t)');
- plot2d(T,B,[2]);
- subplot(2,2,2)
- xtitle( 'Função da questão M', 'T', 'c(t)');
- plot2d(T,C,[5]);
- subplot(2,1,2)
- xtitle( 'Função da questão E e M sobrepostas', 'T', 'c(t)');
- plot2d(T,B,[2]);
- plot2d(T,C,[5]);
- h1=legend(['função da E';'função da M']);
- //Exportar graficos
- xs2png(gcf(),Dir +"\Segundo Teste.png");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement