Plotting an evelope between high and low price forecasting
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Oliver Wilson
am 14 Dez. 2022
Bearbeitet: Bora Eryilmaz
am 14 Dez. 2022
I am doing some price forecasting for a system and i wish to plot an envelope between the high and low forecasts. These change due to differences in the cost of generating electricity etc. I would like to plot the year on the x axis and profit on y with shading between the lines formed by the high and low estimates. Any help would be appreciated and i have attached my code so far. All data is imported from an excel spreadheet which can be attached if needed
clc
clear all
close all
data = xlsread('Price_forecasting','B6:BO84');
y = data(:,1);%year
dlw = data(:,49);% Low profit of dairy with system
dcw = data(:,50);% Central Profit with system
dhw = data(:,51);% high Profit of dairy with system
0 Kommentare
Akzeptierte Antwort
Bora Eryilmaz
am 14 Dez. 2022
Bearbeitet: Bora Eryilmaz
am 14 Dez. 2022
high = rand(10,1) + 2;
low = rand(10,1);
med = (high+low) / 2;
year = (1:10)';
% Corners of the patch to paint.
patch(...
[year; year(end); year(end:-1:1); year(1)], ...
[high; low(end); low(end:-1:1); high(1)], ...
'y')
hold on;
plot(year, med, 'b', 'LineWidth', 2)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Measurements and Feature Extraction finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!