简体   繁体   中英

Plotting each subsets of data in matlab

I have a matrix of m = (50507x11) rows and column and I want to plot column 11 but in subsets of the data. For example, I want to plot column 11 in sections, eg plot(m(1:500,11)), then plot(m(500:1000,11)) and so on but in a for loop or whatever loop in matlab.

Anyone has any idea how to do that.

You might want to do this:

column = 11;
chunksize = 500;
n = floor(size(m, 1) / chunksize);
l = ceil(sqrt(n));
for i = 1 : n
    chunk = m((i - 1) * chunksize + 1 : i * chunksize, column);
    subplot(l, l, i);
    plot(chunk);
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM