programa de matlab.txt

download programa de matlab.txt

If you can't read please download the document

Transcript of programa de matlab.txt

function p= producto (x) p=1; n=length (x); for i=1:(n-1) p=p*( ((-1)^(i))*(x(i+1)-x(i)) ); endendfunction p= producto14(X) p=1; n=length(x); for i=1:(n-2) p= p*( (x(i+2)-x(i))/(x(i+1)-x(i)) ); endendfunction p= producto15(x) p=1; n=length(x); for i=1:(n-1) p=p*( (x(i+1))/(x(i)) ); endendfunction p= producto16(x) p=1; n=length(x); for i=1:(n-2) p= p*( (x(i+2))-(x(i)))/(x(i+1)) ); endendfunction p=producto17(x) p=1; n= length(x); for i=1:(n-2) p=p*( (x(i+2)-(x(i)) ); endendfunction p=producto18(x) p=1; n=length(x) for i=1:n p= p*(10^(i)) endendfunction P=producto19() P=1; n=4; for i=1:n p=p*( (i)^(i) ); endendfunction p=producto20() p=1; n=4; for i=1:n p=p*( 1/(i) ); endendfunction P=prodcuto21() p=1; n=4; for i=1:n P=p*( 5/(i) ); endendfunction p=producto22() p=1; n=4; for i=1:(n-1) P=p*^( (i)/(i+1) ); endendfunction p=producto23() p=1; n=5; for i=1:(n-1) p=P*( ((i)-1)/((i)+1) ); endendfunction P=producto24(a) p=1; n=length(a) for i=1:n p=p*( (a(i)-1/(a(i)+1) ); endendfunction p=producto25(a,b) p=1; n=length(a); for i=1:n p=p*( ( a(i)-b(i) )/( a(i)+b(i) ) ); endendfunction P=producto26(a,b,c) P=1; n=length(a); for i=1:n P=P*( (a(i))+(a(i))+(c(i)) ); endendfunction P=producto27(a,b,c) P=1; n=length(a); for i=1:n P=P*( (a(i))+(b(i))/(c(i))+(b(i)) ); endendfunction P=producto28(a) p=1; n=length(a) for i=1:(n/2) p=p*( (a(2*i)) ) endendfunction p=producto29(a) p=1; n=length(a) for i=1:(n/2) p=p*(a(2*i)-1)/(a (2*i) ); endendfunction p=producto30(a) p=1; n:length (a) for i=1:(n/2) p=p*( (a(2*i)-1)/(a(2+i)) ); endendfunction p=producto31(a,b,c) p=1; n:length(a) for i=1:(n-2) p=p*( ( (a(i+2))+(b(i+1))+(c(i)) )/( (a(i))+(b(i+1))+(c(i+2)) ) ); endend