Sei sulla pagina 1di 10

>> Nombre=input('>Cual es tu nombre?') >Cual es tu nombre? lenin Error using input Undefined function or variable 'lenin'.

>Cual es tu nombre?30

Nombre =

30

>> if Nombre=='30','Correcto',else 'No es mi nombre',end

ans =

No es mi nombre

>> Nombr=input('>Cual es tu nombre?') >Cual es tu nombre?Lenin Error using input Undefined function or variable 'Lenin'.

>Cual es tu nombre?Nombr=input('>Cual es tu nombre?') Error: The expression to the left of the equals sign is not a valid target for an assignment.

>Cual es tu nombre?30

Nombr =

30

>> Nmbr=input('>Cual es tu nombre?','s') >Cual es tu nombre?lenin

Nmbr =

lenin

>> if Nmbr=='lenin','Correcto',else 'No es mi nombre',end

ans =

Correcto

>> if strcmp(Nmbre,'lenin')==1,'Correcto',else 'No es mi nombre',end Undefined function or variable 'Nmbre'.

>> if strcmp(Nmbr,'lenin')==1,'Correcto',else 'No es mi nombre',end

ans =

Correcto

>> Edad=input('>Cual es tu Edad?') >Cual es tu Edad?30

Edad =

30

>> if Edad==30,'Igual',elseif Edad>30,'Mayor',else 'Menor',end

ans =

Igual

>> Edad=input('>Cual es tu Edad?') >Cual es tu Edad?20

Edad =

20

>> if Edad==30,'Igual',elseif Edad>30,'Mayor',else 'Menor',end

ans =

Menor

>> Num=input('>Ingrese el numero de horas') >Ingrese el numero de horas30

Num =

30

>> if Edad==30,'Igual',elseif Edad>30,'Mayor',else 'Menor',end

ans =

Menor

>> if Num>1&&Num<10,'$10',elseif Num>11&&Num<25,'$15',else '$20' ,end

ans =

$20

>> if gt(Num,1)&&lt(Num,10),'$10',elseif gt(Num,11)&&lt(Num,25),'$15',else '$20' ,end

ans =

$20

>> horas >Ingrese el numero de horas10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 10) pago=horas*20;

>> horas >Ingrese el numero de horas 10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 10) pago=horas*20;

>> horas} horas} | Error: Unbalanced or unexpected parenthesis or bracket.

>> horas >Ingrese el numero de horas 10 Attempt to execute SCRIPT horas as a function:

C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 4) pago=horas*10;

>> horas >Ingrese el numero de horas10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 4) pago=horas*10;

>> horas >Ingrese el numero de horas10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 4) pago=horas*10;

>> horas >Ingrese el numero de horas10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 4) pago=horas*10;

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 5) pago=horas*10;

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Attempt to execute SCRIPT horas as a function: C:\Program Files\MATLAB\R2012a\bin\horas.m

Error in horas (line 5) pago=horas*10;

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 >> pago

pago =

100

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 >> pago

pago =

100

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Error using input The first argument to INPUT must be a string.

Error in horas (line 13) resul=input(pago);

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Error using input

The first argument to INPUT must be a string.

Error in horas (line 5) pago=input(Num*10);

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Undefined function 'ounput' for input arguments of type 'double'.

Error in horas (line 5) pago=ounput(Num*10);

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Undefined function 'output' for input arguments of type 'double'.

Error in horas (line 5) pago=output(Num*10);

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Undefined function 'output' for input arguments of type 'double'.

Error in horas (line 5) output(Num*10);

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10 Error using input The first argument to INPUT must be a string.

Error in horas (line 5) input(Num*10);

>> horas >Cual es tu nombre?lenin >Ingrese el numero de horas10

pago =

100

Potrebbero piacerti anche