Posts

Showing posts with the label #matlab

Como gráficar datos de excel en Matlab

Image
CODE data=xlsread('grafica.xlsx'); x=data(:,1);  %frecuencia x2=data(:,2); %s11 figure(1); plot(x,x2); title('Prueba gráfica') xlabel('Frecuencia GHz'); ylabel('s11'); legend('gráfica'); grid on; **************************************************************** INSTALAR MATLAB 2020 https://www.youtube.com/watch?v=_LgWIVh6YAU&list=PL3oHAd-_RgU6kFQpJsAI3voPhaBdPaNFt&index=2

Como gráficar funciones trigonométricas en Matlab.

Image
CODE SCRIPT figure(1) x = 0:pi/100:2*pi; y = sin(x); figure(1) x = 0:pi/100:2*pi; y = sin(x); plot(x,y); xlabel('x'); ylabel('sin(x)'); title('sin'); legend('seno'); grid on; figure(2) x = 0:pi/100:2*pi; y = cos(x); plot(x,y); xlabel('x'); ylabel('sin(x)'); title('Funcion coseno'); legend('cos'); figure(3) x = 0:pi/100:2*pi; y = sin(x); plot(x,y); hold on y2 = cos(x); plot(x,y2); title('Funcion coseno y seno'); legend('sin', 'cos'); hold off figure(4) subplot(2,1,1); x = 0:pi/100:4*pi; y = sin(x); plot(x,y); xlabel('x'); ylabel('sin(x)'); title('Función sin'); legend('sin'); subplot(2,1,2); x2 = 0:pi/100:4*pi; y2 = cos(x2); plot(x2,y2); xlabel('x'); ylabel('sin(x)'); title('Funcion coseno'); legend('cos'); **************************************************************************** COMO INSTALAR MATLAB 2020 https://www.youtube.com/watch...

Funciones de STRING en Matlab

Image
FUNCIONES DE STRING EN MATLAB FUNCIÓN DESCRIPCIÓN length(string) Determina la cantidad de chars que tiene el string upper(string) Permite convertir todas las letras a Mayúsculas lower(string) Permite convertir todas las letras en minúsculas isletter(string) Permite evaluar si un char es una letra. Retorna 1 si es letra o 0 en caso contrario. isspace(string) Permite evaluar si un char es un espacio en blanco. Retorna 1 si es, o 0 caso contrario. double(string) Permite conocer el valor numérico del código Ascii de un Char char(ascii) Permite conocer el char asociado a un código Ascii str2num(char) Permite convertir el string o char a número num2str(valor) Permite convertir el número en string strcat(texto1,texto2) Permite concatenar o unir texto [palabra, remanente]=strtok(string) Permite separar las pala...