# Plot for 2nd reason why MathWorks shoud have an office in my village

• Created by: Aurelien Queffurust

### Aurelien Queffurust (view profile)

• Latest result: Plot created
• Created on: 12 Sep 2012
• Liked: 2 times

Included from trend description:

In my previous Trendy MathWorks should have an office in my village ... !! I only compare the temperature between my village Corbières and Meudon. But one of my friends told me that another benchmark about the quantity of rain will be more convincing. So let's try !

I just get the quantity in mm of rain during 14h and 17h which corresponds to the 7th column : Corbières and Meudon

```% 2nd reason why MathWorks shoud have an office in my village
%   time vector is: time1794
%   data vector is: data1794

% deal NaN data in case Trendy system shut down (14-Sep-2012)
data1794
index =find(isnan(data1794))
if ~isempty(index)
data1794(index(1),:)= [];
time1794(index(1),:)= [];
end

h211= subplot(211)
plot(time1794,data1794(:,1), 'go-');
hold on
plot(time1794,data1794(:,2), 'ro-');
datetick
h_leg = legend('Corbières','Meudon')
set(h_leg,'location','best')
title('it is raining men!')

h222= subplot(212)
tot = sum(data1794);

rectangle('Position',[0.5 0  1 tot(1)],'facecolor','green')
text(.8,tot(1)/2,[num2str(tot(1)) ' mm'])

rectangle('Position',[2 0  1 tot(2)],'facecolor','red')
text(2.3,tot(2)/2,[num2str(tot(2)) ' mm'])
ylabel('quantity of rain in mm')

study_days = fix(time1794(end)-time1794(1))
title([int2str(study_days) ' days of study'])

```
Tags: