Defining upper and lower control limits for a graph

19 次查看(过去 30 天)
Trying to get thge example below like the one above with set limits for ucl and lcl where ucl = 1.5*mean

回答(1 个)

the cyclist
the cyclist 2022-5-23
Here is a simple example of setting plot limits based on the data. (The last line of code is where I set the limits.)
x = 1:50;
y = rand(size(x));
mean_y = mean(y);
ucl = 1.5*mean_y;
lcl = -1.5*mean_y;
figure
plot(x,y)
set(gca,"YLim",[lcl ucl])

类别

Help CenterFile Exchange 中查找有关 Automated Driving Toolbox 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by