Commit c7cdd0d8 authored by renzo's avatar renzo

filtro argentina arreglado

parent 7fef61ce
function []=filtro_ARGENTINA(output_path)
function []=filtro_ARGENTINA(output_path, date)
%%
%%
......@@ -14,21 +14,18 @@ function []=filtro_ARGENTINA(output_path)
% SantaTeresita
%%
formatted_date = datestr(now, 'yyyymmdd');
day=datenum(formatted_date,'yyyymmdd');
dates=datevec(day);
today=datestr(day,'yyyymmdd');
today_1=datestr(day-1,'yyyymmdd');
today_2=datestr(day-2,'yyyymmdd');
today_3=datestr(day-3,'yyyymmdd');
today_4=datestr(day-4,'yyyymmdd');
fileSHN_0=sprintf('./../%1$s/data.csv',today);
fileSHN_1=sprintf('./../%1$s/data.csv',today_1);
fileSHN_2=sprintf('./../%1$s/data.csv',today_2);
fileSHN_3=sprintf('./../%1$s/data.csv',today_3);
fileSHN_4=sprintf('./../%1$s/data.csv',today_4);
day=datenum(date,'yyyymmdd');
date_str=datestr(day,'yyyymmdd');
date_str_1=datestr(day-1,'yyyymmdd');
date_str_2=datestr(day-2,'yyyymmdd');
date_str_3=datestr(day-3,'yyyymmdd');
date_str_4=datestr(day-4,'yyyymmdd');
fileSHN_0=sprintf('./../%1$s/data.csv',date_str);
fileSHN_1=sprintf('./../%1$s/data.csv',date_str_1);
fileSHN_2=sprintf('./../%1$s/data.csv',date_str_2);
fileSHN_3=sprintf('./../%1$s/data.csv',date_str_3);
fileSHN_4=sprintf('./../%1$s/data.csv',date_str_4);
%%
fileID=fopen(fileSHN_4);
......@@ -267,6 +264,6 @@ function []=filtro_ARGENTINA(output_path)
fechas=[datenum(fecha4); datenum(fecha3);datenum(fecha2);datenum(fecha1);datenum(fecha0)];
save(strcat(output_path, "/", sprintf('%1$sArgentina.mat',today)),'fechas','Atalaya','BuenosAires','LaPlata','MardelPlata','Oyarvide','PiloteNorden','SanFernando','SanClemente','SantaTeresita')
save(strcat(output_path, "/", sprintf('%1$sArgentina.mat',date_str)),'fechas','Atalaya','BuenosAires','LaPlata','MardelPlata','Oyarvide','PiloteNorden','SanFernando','SanClemente','SantaTeresita')
delete fileSHN_4 % Borra el CSV más antiguo ya que no volverá a ser utilizado
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment