Skip to main content

Posts

Showing posts from April, 2013

10 commands you should master when working with the Cisco IOS

The Cisco IOS provides thousands of commands, and configuring it can be challenging. Here are 10 commands you need to know, inside and out, when using the Cisco IOS. #1: The “?” It may seem entirely too obvious that you should know how to type ? to ask for help when using the Cisco IOS. However, the Cisco IOS is completely different from other operating systems when it comes to using the question mark (help key). As the IOS is a command-line operating system with thousands of possible commands and parameters, using the ? can save your day. You can use the command in many ways. First, use it when you don’t know what command to type. For example, type ? at the command line for a list of all possible commands. You can also use ? when you don’t know what a command’s next parameter should be. For example, you might typeshow ip ? If the router requires no other parameters for the command, the router will offer CR as the only option. Finally, use ? to see all commands that start with a part…

Biseccion C++ (codigo)

% f: funcion a la que se va a sacar el cero % a, b: limites del intervalo % delta: error absoluto maximo f = @(x)(x*sin(x)-1); a = 0; b = 2; delta = 0.00001; % ya: valor de la funcion en a % yb valor de la funcion en b % yc: valor de la funcion en c % err: error de la ultima iteracion % maxi: maximo de iteraciones ya = f(a); yb = f(b); if ya * yb > 0 disp "No existe una raiz en el intervalo" break end maxi = 1 + round((log(b-a)-log(delta))/log(2)); for k = 1:maxi c = (a+b) / 2; yc = f(c); if yc == 0 a = c; b = c; elseif yb*yc > 0 b = c; yb = yc; else a = c; ya = yc; end if b-a < delta break end end c = (a+b) / 2; err = abs(b-a); yc = f(c); % mostrar resultados printf("La aproximaciĆ³n al cero es: %10.6f\n",c); printf("Con un error absoluto menor a %8.6f\n",err); printf("El valor de la funcion en la aproximacion es %10.8f\n",yc);

Gauss C++ (codigo)

% A es la matriz de coeficientes % b es el vector de terminos independientes % x es el vector solucion % n es el orden del sistema [n,m] = size(A); % eliminacion for i=1:n for k=i+1:n factor = (A(k,i)/A(i,i)); A(k,i:n) = A(k,i:n) - factor*A(i,i:n); b(k) = b(k) - factor*b(i); end end %sustitucion inversa x = zeros(1,n); x(n) = b(n)/A(n,n); for k=n-1:-1:1 x(k) = (b(k) - sum(x(k+1:n).*A(k,k+1:n)))/A(k,k); end x