how to plot only certain quantiles in matlab

To plot only certain quantiles, you can use the quantile function to compute the desired quantiles, and then plot them using the plot function.

Here is an example of plotting the 10th, 50th, and 90th percentiles of a data set:

main.m
% generate some data
data = randn(1000,1);

% compute the desired quantiles
q = quantile(data,[0.1 0.5 0.9]);

% plot the quantiles
plot(q,'o-');
146 chars
9 lines

This will plot the three quantiles as points connected by a line. You can customize the plot appearance as desired (e.g., change the line style, marker type, color, etc.).

related categories

gistlibby LogSnag