how to create different matrices?
3 views (last 30 days)
Show older comments
i have 30,000 rand value that i want to separate 400 to 400...then i wanna plot them but the x axis should start at 0 not 400 or 800 or...any help please?
Accepted Answer
Jonas
on 7 Dec 2022
you could split them into multiple 400x1 vectors by this
data=rand(30000,1);
data=reshape(data,400,1,[]);
size(data)
you can then get each vector using indexing data(:,:,idx)
for idx=1%:75 % commented out to avoid to much plotting here
plot(0:399,data(:,:,idx));
% saveas(gcf,[num2str(idx),'.jpg']);
end
More Answers (0)
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!