I have a vector (8760 x 1) with the hourly electricity prices in a network and another vector (8760 x 1) with the quantity of electricity sold in each hour. I want to know how to get and plot the probability density function of that data. As an example, here are the first eleven elements of each vector:
Prices = [44.2200; 45.1300; 46.2300; 47.9100; 49.5700; 48.6900; 47.2000; 46.5100; 46.5200; 51.5900; 59.0700]; SoldElectricity = [0; 0; 0; 2.1255; 1.9807; 1.8474; 1.0561; 0; 0; 0.3586; 6.0510];
And I want to get a plot like this as a result:
(In the image three different sold electricity vectors were plotted, in my case, I only need to plot one) Any help would be appreciated, thanks!
Best Answer