Problems comparing data from two matrices with different sizes in MatLab

1

I have an array of data, with non-leap years, and in which array was separated:

Data = [year month day data1 data2];

Size = 14965 rows and 5 columns

And I have an array parameters, to compare with "data1" and "data2", with size 365 rows and 2 columns, where in column 1 I have the parameter x1 to compare with "data1" and in column 2 I have x2 to compare with "data2".

Parameters = [x1 x2]

Parameter x1 should be compared to "data1" daily, where I should analyze whether "data1" > x1. The same must be done for "data2" in relation to x2.

I'm having trouble creating a method or a loop to make these daily and yearly comparisons of the "Data" array.

Can anyone help me?

    
asked by anonymous 13.04.2017 / 20:51

1 answer

0

Your question was not very clear. However ... by what I could imagine ...

Data has 14965 rows relating to 41 years of data, confers? data1 and data2 with 365 rows referring to 1 year of data, check?

ano_analise = 1; 
id_dado_ano = (ano_analise-1)*(1:100);
comparacao_diaria = Dados(id_dado_ano,[4 5])>[x1 x2];
percentagem_anual = sum(comparacao_diaria)./size(comparacao_diaria,1)

Does it make sense?

    
24.04.2017 / 00:01