ploting/graphing confidence interval

1 visualizzazione (ultimi 30 giorni)
after doing statistical calculations I have the following confidence intervals
Confidence_interval_Negative_INFLPS =
0.0054 0.0065 0.0001 0.0286 0.0206 0.0075 -0.0237 0.0485 0.0541
0.0071 0.0108 0.0062 0.0367 0.0313 0.0175 -0.0102 0.0638 0.0812
The first row is the upper bound and the bottom row is the lower bound. Here is the true data below,
dist_to_origin_observed_negative_original =
0.0054 0.0262 0.0954 0.1577 0.2355 0.4000 0.5194 0.6543 0.8047
I have to show whether each of the points above fall within the confidence intervals of the upper and lower bound as shown in the first two sets. The total length of both data sets is 9 and they go in order, first with first 2, second with second 2, third with third 2...all the way till the last 9th value with the last 2 sets. I just need to plot the confidence interval. Please help me achieve this.. Thank you

Risposta accettata

Star Strider
Star Strider il 19 Gen 2017
You need the plot and hold functions:
Confidence_interval_Negative_INFLPS = [0.0054 0.0065 0.0001 0.0286 0.0206 0.0075 -0.0237 0.0485 0.0541
0.0071 0.0108 0.0062 0.0367 0.0313 0.0175 -0.0102 0.0638 0.0812];
dist_to_origin_observed_negative_original = [0.0054 0.0262 0.0954 0.1577 0.2355 0.4000 0.5194 0.6543 0.8047];
figure(1)
plot(Confidence_interval_Negative_INFLPS(1,:), '-b')
hold on
plot(Confidence_interval_Negative_INFLPS(2,:), '-b')
plot(dist_to_origin_observed_negative_original, 'gp')
hold off

Più risposte (1)

Osita Onyejekwe
Osita Onyejekwe il 19 Gen 2017
thank you! :)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by