Lista 03a - DCC/UFMG
Lista 03a - DCC/UFMG
Lista 03a - DCC/UFMG
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
fprintf(1,'Sen(x)');X = input('Digite um valor para X: ');X = X * pi/180;FAT = 1;SN = 0;for I = 1 : 15if ( X ~= 0 )if ( mod(I, 2) == 0 )SN = SN - X ^ ( 2 * I - 1 ) / FAT; % termo parelseSN = SN + X ^ ( 2 * I - 1 ) / FAT; % termo ímparendendFAT = FAT * ( 2 * I ) * ( 2 * I + 1 );endfprintf(1,'Sen(%d) = %f\n',X,SN);fprintf(1,'Sin(%d) = %f\n',X,sin(X));<strong>UFMG</strong> – ICEx – <strong>DCC</strong> – Programação de Computadores – 2º. Sem 2005 – David Menoti 56