Sunteți pe pagina 1din 4

ESCUELA SUPERIOR POLITECNICA DE CHIMBORAZO

FACULTADE DE INFORMATICA Y ELECTRONICA

HERRAMIENTAS “EDA”

NOMBRE: JHONATAN SILVA

CURSO: SEGUNDO “A”

PANTALLA DE SCRIPT
function [ r1,r2,r3 ] = Ejemplo1(x)
%UNTITLED6 Summary of this function goes here
% Detailed explanation goes here
r1=2*x.^2;
r2=x+1;
r3=2*x-1;

end
PANTALLA DE COMANOS
>> [a,b,c]=ejemplo1(2)
a=
8
b=
3
c=
3

>> [a,b,c]=ejemplo1(x)
a=
2 8 18 32 50 72 98 128 162 200
b=
2 3 4 5 6 7 8 9 10 11
c=
1 3 5 7 9 11 13 15 17 19
PANTALLA DE SCRIPT
function [ r1,r2,r3 ] = Ejemplo1(x)
%ESTA FUNCION CALCULA TRES FUNCIONES Y REQUIERE UN VALOR DE ENTRADA Y
%DEBUELVE TRES VALORES DE SALIDA O RESULTADOS
% Detailed explanation goes here
r1=2*x.^2
r2=x+1
r3=2*x-1

end
PANTALLA DE COMANOS
>> help ejemplo1
ESTA FUNCION CALCULA TRES FUNCIONES Y REQUIERE UN VALOR DE ENTRADA Y
DEBUELVE TRES VALORES DE SALIDA O RESULTADOS
Detailed explanation goes here

>> ejemplo1(2)
r1 =
8
r2 =
3
r3 =
3
ans =
8

EJERCICIOS 1

PANTALLA DE SCRIPT
function [ r1 ] = ejercicio1( x )
%UNTITLED8 Summary of this function goes here
% Detailed explanation goes here
r1=x.^2;

end

PANTALLA DE COMANOS
>> x=1:10;
>> ejercicio1(x)

ans =

1 4 9 16 25 36 49 64 81 100

EJERCICIOS 2

PANTALLA DE SCRIPT
function [ r1 ] = ejercicio1( x )
%UNTITLED8 Summary of this function goes here
% Detailed explanation goes here
r1=exp(1./x);

end

PANTALLA DE COMANOS
>> x=1:10;
>> ejercicio1(x)

ans =

2.7183 1.6487 1.3956 1.2840 1.2214 1.1814 1.1536 1.1331 1.1175 1.1052

EJERCICIOS 3

PANTALLA DE SCRIPT
function [ r1 ] = ejercicio1( x )
%UNTITLED8 Summary of this function goes here
% Detailed explanation goes here
r1=sin(x.^2);

end

PANTALLA DE COMANOS
>> x=1:10;
>> ejercicio1(x)

ans =

0.8415 -0.7568 0.4121 -0.2879 -0.1324 -0.9918 -0.9538 0.9200 -0.6299 -0.5064
EJERCICIOS 4

PANTALLA DE SCRIPT
function [ r1,r2,r3 ] = ejercicio1( x )
%Esta funcion calcula las tres anteriores en una sola ;)
% Detailed explanation goes here
r1=x.^2;
r2=exp(1./x);
r3=sin(x.^2);

end

PANTALLA DE COMANOS
>> help ejercicio1
Esta funcion calcula las tres anteriores en una sola ;)
Detailed explanation goes here

>> x=1:10;
>> [a,b,c]=ejercicio1(x)

a=
1 4 9 16 25 36 49 64 81 100

b=
2.7183 1.6487 1.3956 1.2840 1.2214 1.1814 1.1536 1.1331 1.1175 1.1052

c=
0.8415 -0.7568 0.4121 -0.2879 -0.1324 -0.9918 -0.9538 0.9200 -0.6299 -0.5064

EJERCICIOS 5

PANTALLA DE SCRIPT
function [ r1,r2] = ejercicio1( x, y, z )
%Esta funcio tiene tres variables para su calculo ;)
% Detailed explanation goes here
r1=x.^2+y.^2+z;
r2=y.^3+2.*z;

end

PANTALLA DE COMANOS
>> help ejercicio1
Esta funcio tiene tres variables para su calculo ;)
Detailed explanation goes here

>> x=1:10;
>> y=x;
>> z=y;
>> [a,b]=ejercicio1(x,y,z)

a=

3 10 21 36 55 78 105 136 171 210

b=
3 12 33 72 135 228 357 528 747 1020
EJERCICIOS 6

PANTALLA DE SCRIPT
function [ pap,mam,mhaps] = ejercicio1( x )
%Tres tipos de converciones ;)
% Detailed explanation goes here
pap=x*(0.0833333);
mam=x*(0.000621371);
mhaps=x*(1.46667);

end

PANTALLA DE COMANOS
>> x=1:10;
>> [a,b,c]=ejercicio1(x)

a=

0.0833 0.1667 0.2500 0.3333 0.4167 0.5000 0.5833 0.6667 0.7500 0.8333

b=

0.0006 0.0012 0.0019 0.0025 0.0031 0.0037 0.0043 0.0050 0.0056 0.0062

c=

1.4667 2.9333 4.4000 5.8667 7.3333 8.8000 10.2667 11.7334 13.2000 14.6667

S-ar putea să vă placă și